• Resolved peteincali2103

    (@peteincali2103)


    Hi Franky,

    I added the following to form.php in my theme/eme-frontend-submit/ and it works well, however, if the field contains quotes (and possibly other special characters), the field does not get saved. Any ideas on how to fix that?

    <input id="short_desc" name="event_attributes[short_desc]" value="" type="text" maxlength="120">

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Franky

    (@liedekef)

    I’ll test the special char-issue later on, but don’t add it like that, just use the php code given in the examples for adding attribute fields. In your case something like:

    
    EMEFS::attribute('short_desc','text','maxlength="120"');
    
    Thread Starter peteincali2103

    (@peteincali2103)

    Thank you. I need to confirm this now. It appears it may not be the quotes that was breaking it. Sorry for the inconvenience. I will let you know when I figure out the actual problem.

    Thread Starter peteincali2103

    (@peteincali2103)

    Ok, so I figured out what the problem I am having is. I have set up a short description attribute as you outlined, and it works well, but if an apostrophe is used in the Short Description attribute that I set up, then it will not display in the event listing. In my event listing template I have:

    [eme_if tag='#_ATT{short_desc}' is_empty=1]
    #_EXCERPT
    [/eme_if]
    [eme_if tag='#_ATT{short_desc}' is_empty=0]
    #_ATT{short_desc}
    <br />
    [/eme_if]

    However, if I insert an apostrophe (‘),not a double quote in the short description. The long description only shows. So it appears that the apostrophe is making the short description to be considered “empty”. To clarify, if there is no apostrophe in the event short description, it will show in the event listing, but if there is, it switches over to the long description. The long description (main) has no issues with apostrophes.

    Thanks!

    Plugin Author Franky

    (@liedekef)

    That’s why I invented the ESC part:

    
    [eme_if tag='#ESC_ATT{short_desc}' is_empty=1]
    #_EXCERPT
    [/eme_if]
    

    See also the doc and the examples: https://www.e-dynamics.be/wordpress/?cat=24

    • This reply was modified 8 years, 1 month ago by Franky.
    Thread Starter peteincali2103

    (@peteincali2103)

    Franky, thank you so much for your great product, patience and support. This is resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Quotes in extra attribute’ is closed to new replies.