• Resolved kevmuskoka

    (@kevmuskoka)


    I added a heading field type, I was trying to format the output even with simple <p></p> but they wouldn’t save. I tried a bulleted list in “Visual” and tried using the UL/LI html codes in “Text” methods, both didn’t save when I updated fields. I went into the database, found where it was saved and updated it directly in there and was able to use any HTML I wanted without a problem ?

    • This topic was modified 4 years, 2 months ago by kevmuskoka.
    • This topic was modified 4 years, 2 months ago by kevmuskoka.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    Thanks for letting me know about this, looks like I forgot to apply auto paragraphs to the output of the field.

    You won’t be able to add <p> tags, whey will get scrubbed, but with auto paragraphs, they will be added back in.

    If you want to make this change yourself, you can do this:

    In the plugin file classes/PDb_fields/heading.php on line 71, you’ll see:

    return \Participants_Db::apply_filters('translate_string', $this->field->default );

    change this to:

    return wpautop( \Participants_Db::apply_filters('translate_string', $this->field->default ) );

    and your paragraphs will be displayed.

    I did not see a problem with those list tags, however, so I’m not sure what the issue is there…its working for me here.

    Thread Starter kevmuskoka

    (@kevmuskoka)

    Thanks, auto paragraphs is really all I need – that’s essentially what I was trying to force by entering the code.

    It seems with the bullet list, after further testing, if I tried to manually enter the code in the “text” (html) editor, it wouldn’t save. But, if I add a bullet list in the “Visual” editor it seems to work (but, only with new text – not by highlighting existing text and making it a bullet list – which appears to work but doesn’t save).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Heading field type not saving HTML formatting’ is closed to new replies.