Home › Forums › Calendar Products › Events Calendar PRO › Additional field values being modified
- This topic has 3 replies, 2 voices, and was last updated 12 years ago by
Casey D.
-
AuthorPosts
-
May 1, 2014 at 4:50 am #147238
tuberb
ParticipantWe have defined several additional fields that we are using in a specific template; not the default view for an event.
We ideally would like the text field type to be WYSIWYG for some of them, since we want to have line or paragraph breaks in the values. Since that is not supported, I thought I would enter “<br />” tags in the field value, but when I did that they were stripped out when the event is saved.
I then thought I would use a vertical bar “|” within the value and replace that with a line break in the template, but found that character is also being altered when the event is saved.
So is there a way to control what kinds of post-processing is done on the values, so I don’t have to define multiple additional fields just to accommodate line breaks?
Thanks.May 1, 2014 at 8:58 am #147519Casey D
MemberHello tuberb,
Text inputs on these sorts of forms are sanitized for database input, with certain characters and html stripped to prevent nefarious attacks and weird problems. On the onset I wouldn’t consider them for displaying of information, only the storing of information. They are definitely not WYSIWYG.
That said though, I believe you are very close to what you want, especially if you are savvy enough to make your own template.
In my test a ‘pipe’ ( | ) was transformed to a comma ( , ). Is that your experience too?
It’s an ugly fix, but if you are doing a find/replace in your template anyways, you could just invent a unique codeword/system like :break: or -br- or something else that will pass the filter, and you could easily find/replace in your template.
Again, this isn’t standard practice, isn’t recommended or supported, but should get you what you want.
I *think* this is correct (at least, this is how I would approach it given with the constraints). I might be wrong though, let me know if it doesn’t work for whatever reason.
– Casey Driscoll
May 1, 2014 at 9:33 am #147547tuberb
ParticipantYes the pipe was transformed into a comma.
I ended up setting up logic to convert an arbitrary string (i used [NL]) which the sanitation did not touch and which I converted to a <br /> in the template.
It might be nice to be able to turn off the sanitation, or have a WYSIWYG field type available for additional fields, but I guess I am all set for now, assuming the user remembers the [NL] or can find my documentation about it.May 2, 2014 at 8:18 am #148214Casey D
MemberSounds good. Maybe not the ultimate solution, but should work well for the time being I think.
We’d love it if you would leave us a review and let people know how much you like the plugin! http://m.tri.be/jt
I’ll go ahead and close this thread. Let us know if we can help with anything else.
Cheers!
– Casey Driscoll
-
AuthorPosts
- The topic ‘Additional field values being modified’ is closed to new replies.
