• in my formidable pro form i have a field value (type checkbox with images) with html and it looks just fine everywhere:

    <div><strong>ALVA Lounge</strong><br>20-60 Personen<br><br>600 € Raummiete<br>zzgl. Nebenkosten</div>
    <div><strong>Lichtermeer</strong><br>40-120 Personen<br><br>1.000€ Raummiete<br>zzgl. Nebenkosten</div>
    <div><strong>Panorama Lounge</strong><br>50-120 Personen<br><br> 1.200€ Raummiete<br>zzgl. Nebenkosten</div>
    <div><strong>Gro?es Theater</strong><br>60-160 Personen<br><br>1.000€ Raummiete<br>zzgl.</div>

    the challenge is to output it in e2pdf template this way:
    ALVA Lounge, Lichtermeer, Panorama Lounge, Gro?es Theater
    what i have managed so far is this:
    [e2pdf-format-output search="<br>" replace=" " filter="strip_tags,html_entity_decode"][220][/e2pdf-format-output]
    this will generated this output:
    ALVA Lounge 20-60 Personen 600 € Raummiete zzgl. Nebenkosten
    Lichtermeer 40-120 Personen 1.000€ Raummiete zzgl. Nebenkosten
    Panorama Lounge 50-120 Personen 1.200€ Raummiete zzgl. Nebenkosten
    Gro?es Theater 60-160 Personen 1.000€ Raummiete zzgl. Nebenkosten

    so i get each value in a separate line where the title is bold. bold is fine. now i need to get rid of everything after that and then put everything in one line to achieve this goal (once again):
    ALVA Lounge, Lichtermeer, Panorama Lounge, Gro?es Theater

    my approach was something like this:
    [e2pdf-format-output search="<br>" replace=" " filter="strip_tags,html_entity_decode" explode="<strong>" implode=", "][220][/e2pdf-format-output]

    but it does not work. also tried this:
    [e2pdf-format-output explode="</strong>" implode=", "][e2pdf-format-output search="<br>" replace=" " filter="strip_tags,html_entity_decode"][220][/e2pdf-format-output][/e2pdf-format-output]
    it is not working neither ??

    just for your information how it looks in the frontend form:
    image

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author E2Pdf

    (@oleksandrz)

    – Is this value must be showed inside E2Pdf Template in separated field/object? Or field/object has other Formidable Forms shortcodes?

    -Do you use HTML object or textarea/input?

    • This reply was modified 3 years, 11 months ago by E2Pdf.
    Thread Starter nicmare

    (@nicmare)

    i use the html object to output the stored value in [220].
    do not understand your first question. the value can be outputted in one html object of e2pdf. just like a long string separated by comma. desired output in e2pdf as one line:
    ALVA Lounge, Lichtermeer, Panorama Lounge, Gro?es Theater

    Plugin Author E2Pdf

    (@oleksandrz)

    Try to use please following shortcode if you do not have separate values:

    [e2pdf-format-output search="20-60 Personen600 € Raummietezzgl. Nebenkosten|||40-120 Personen1.000€ Raummietezzgl. Nebenkosten|||50-120 Personen 1.200€ Raummietezzgl. Nebenkosten|||60-160 Personen1.000€ Raummietezzgl." replace="" filter="strip_tags,replace"][220 show="value"][/e2pdf-format-output]

    Thread Starter nicmare

    (@nicmare)

    thanks oleksandr! yes i have separate (simple) values. already found the search and replace function which works good. i was hoping to have some kind of “smart” code without search and replace. because once when i add another option in formidable, i then have to change the code in the e2pdf template too.

    Thread Starter nicmare

    (@nicmare)

    if search and replace is the only option, this works for me fine:
    [e2pdf-format-output search="900|||1100|||1500|||1300" replace="ALVA Lounge|||Lichtermeer|||Panorama Lounge|||Gro?es Theater" filter="strip_tags,html_entity_decode,replace"][220 show=value][/e2pdf-format-output]

    Plugin Author E2Pdf

    (@oleksandrz)

    Here is one more “tricky” solution which can work:

    [e2pdf-format-output substr="1" search="<div>|||<strong>|||</strong>|||</div>" replace="|||, |||<title>|||</title>" filter="strip_tags,html_entity_decode,replace,substr,remove_tags" remove_tags="title"][220][/e2pdf-format-output]

    “Disable WYSIWYG Editor” option must be checked: https://prnt.sc/117i1u1

    P.S. We will think on adding some functionality for easier usage in such cases.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Nested [e2pdf-format-output]?’ is closed to new replies.