#1 October 8, 2013 10:52am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 970

4.0 Official Release Changes

  • We vastly simplified (and hopefully made easier to understand) the environment variables for custom field types in the 4.0 final release. This could cause some backwards compatibility issues, though you mostly will just need to no longer draw your <fieldset> and <label>. There are backwards compatibility tweaks in place so that if you were previously using the old environment variables you can continue to do so.

    Read more about custom field types here: Building Your Own

  • "Custom Function" has been removed as a standard field type. Custom Field Types replaced the need for that long ago and it was legacy code that we didn't want to support going forward.

  • Textarea field types are now htmlspecialchar escaped by default. This could potentially be a big change in behavior if you've been using them for HTML code. The previous behavior was inconsistent with other field types.

  • The "List" field type no longer htmlspecialchars the values. For example, if you previously had an option in your dropdown for "Test & Tester" when the person submitted the form it would be encoded to "Test &amp; Tester". That behavior was unconventional when querying for the value in the database as you wouldn't necessarily expect entities to be encoded as you hadn't entered them into the list options that way.

There are many other changes in the official release that can be read about in the release notes on GitHub. The ones listed above are primarily a concern for users of RC2 and prior.

Offline

#2 October 16, 2013 12:07pm

ant100
Member
Registered: October 16, 2013
Posts: 11

Re: 4.0 Official Release Changes

Offline

#3 October 16, 2013 12:09pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 970

Re: 4.0 Official Release Changes

Offline

#4 December 12, 2013 5:02pm

etherealclarity
Member
Registered: March 7, 2013
Posts: 27

Re: 4.0 Official Release Changes

Textarea field types are now htmlspecialchar escaped by default. This could potentially be a big change in behavior if you've been using them for HTML code. The previous behavior was inconsistent with other field types.

I believe it was mentioned somewhere that if we wanted to get the old behavior back we could create custom fields for that purpose. Are there any resources you could point me to, or even a general direction, in order to accomplish this? I am starting to run into issues with websites I have developed with BigTree where fields for straight HTML code were needed (like the ability for a reasonably-tech-savvy client to drop in a form script generated elsewhere, for example).

Offline

#5 December 13, 2013 11:21am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 970

Re: 4.0 Official Release Changes

You generally just need to create a new form field type like "Raw Textarea" something of that sort.
For the draw file we generally just do:


For the process, the default textarea essentially does this:


Instead you want to just do this in your process file:

Offline

#6 December 13, 2013 1:57pm

etherealclarity
Member
Registered: March 7, 2013
Posts: 27

Re: 4.0 Official Release Changes

Thanks! This is very helpful smile

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.