Support » Plugin: Custom Content Type Manager » custom field MultiSelect (list of link)

  • hello,
    I looked at the website guide of your plugin, but I have not found a solution.
    So I ask here.

    I have to create a “multiselect” checkbox to select a series of external sites.
    The key elements: site name, site address.
    What the user sees in admin: Site Name.
    What the user sees in front: a link with the name of the site, pointing at the url of site.

    eg: SiteA ->

    Tests carried out:
    1) fill in the “Options” the name of the site, and in “Stored Values” the url.
    problems: filling in the template do not know how to retrieve the value of Options.

    eg Site link </ strong>
    <? php print_custom_field (‘fansub: formatted_list’, ‘,’);?>

    2) impost “Alternate Input” with SiteA || SiteA </ a>
    but does not allow me to load the link code and not even see where these changes valor.


    I think it’s just the right code in the template that calls both “Stored Values​​” and “Options”, but I do not know what value or variable to call “Options”. and then are blocked.

    Please, help me,
    thank you very much

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor fireproofsocks


    I think you’re on the right track… I’m not sure what you mean for some of that — I think you didn’t format your code correctly. I would avoid putting HTML into your field options, however. Print those only in the template. So define your multiselect field to use unique options/values like this screenshot:

    Then in your template, you would have to iterate over the values and make them into links. E.g. using the “formatted_list” output filter:

            array('<li><a href="[+value+]">[+value+]</a></li>',
             '<ul>[+content+]</ul>') );

    There might be a bug here, though… I can’t recall off the top of my head if the multi-select field is supposed to store the options and values, or just the values. I think it’s just the options, so you’d have to do more work if you wanted to print out the same text that users saw in the manager, or put the link it its entirety as the value to begin with.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘custom field MultiSelect (list of link)’ is closed to new replies.