Toolset Types
[resolved] how to wrap Type field values inside html tags? (3 posts)

  1. kryvulena
    Posted 3 years ago #

    Yes, this is a lame question, but I'm not familiar with arrays etc.

    I added checkboxes in my Types fields:

    Option 1
    Option 2
    Option 3

    to create a non-ordered list of options rendered at frontend as:

    • Option 1
    • Option 2
    • Option 3

    but I don't know how to render
    for each list element rendered.

    I tried:

    <?php echo(types_render_field("mylist", array("before"=>"<li>","after"=>"</li>"))); ?>

    but it doesn't work. Only values are being rendered - w/o the html tags.

    I will be very thankful for help.


  2. kryvulena
    Posted 3 years ago #

    I'm also looking for a way to render

    <strong>Element 1</strong>
    so that the "strong" tag is used around the element from Types.

  3. mbigul
    Posted 3 years ago #

    Dear kryvulena,

    types_render_field will only return the chosen value. Please check this link for more details http://wp-types.com/documentation/functions/#Select

    [ Signature moderated. ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Toolset Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.