ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Customized SAEF - how to populate dropdowns?

August 27, 2007 9:43am

Subscribe [13]
  • #16 / Aug 28, 2007 10:37am

    chronistin

    104 posts

    Well, a big woohoo for you :exclaim:

    Oh, and just in case anybody else on a similar quest finds this thread, displaying single custom fields in the preview is also easy:

    {exp:pops:pop_input field="fieldname"}{value}{/exp:pops:pop_input}

    Thanks again, Phoebe!

  • #17 / Sep 19, 2007 1:01pm

    rmeder

    97 posts

    Thank you Phoebe!!  I just found this thread and it has made my life much easier!! The plugin is excellent!  A world of thanks!

  • #18 / Mar 11, 2008 3:39am

    stinhambo

    1268 posts

    Great plugin! This should be featured on the Wiki I tell ya!

  • #19 / Mar 14, 2008 3:42am

    Chad Crowell

    242 posts

    OMG you just made my night about 2 hours shorter THANK YOU

  • #20 / Jul 30, 2008 11:12am

    wecreateyou

    86 posts

    It took me a while to find Phoebe Bright’s plugin so I’m commenting to help others that might be trying to find this.

    I didn’t really like the explanations I’ve seen of what this add-on is or what it’s used for, and I had to read three different post to get a clear understanding. So here goes.

    First of all the name seems a bit misleading. This thing is more about making SAEF easier and more flexible than it is about popups (just an opinion)

    If you’re using custom_fields in your SAEF you probably want to show these fields with more flexibility than the standard {custom_fields}{/custom_fields} tag wrap.

    This wonderful plugin lets you put your custom_fields in your SAEF without using the {custom_fields} tag wrap. The advantages are you can label, order, and style your fields with more flexibility than using the standard “tag wrap’ method. 😉

    For dropdowns in an ENTRY form I use:

    {exp:pops:pop_input field="job_type"}
    <label for="{field_name}">Job Type</label>
    {popup}
    <input type="hidden" name="{field_format}" value="none" />
    {/exp:pops:pop_input}

    For dropdowns in an EDIT form I use:

    {exp:pops:pop_input field="job_type" value="{job_type}"}
    <label for="{field_name}">Job Type</label>
    {popup}
    {/exp:pops:pop_input}

    If using in a SEARCH TEMPLATE, might want first value in the list to be Any

    {exp:pops:pop_input value="{job_type}" field="job_type" first="Any"}
    <label for="{field_name}">Job Type</label>
    {popup}
    <input type="hidden" name="{field_format}" value="none" />
    {/exp:pops:pop_input}

    For any other field types (textarea, text, etc.) I use:

    {exp:pops:pop_input field="job_description"}
       <label for="{field_name}">Job Description</label>
       <textarea id="{field_name}" name="{field_name}" rows="6" cols="40">{value}</textarea>
       <input type="hidden" name="{field_format}" value="none" />
    {/exp:pops:pop_input}

    This is a god send for me thanks to Phoebe Bright for such a great addition to the SAEF user community 😊

  • #21 / Oct 10, 2008 5:55pm

    michelangela

    1 posts

    Does this work with related fields then as well? The examples in the post seem to show that related fields should still use the custom fields tags such as

    {custom_fields}{if relationship}
    <select name="{field_name}">
    {options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
    </select>
    {/if}
    {/custom_fields}

    I am new to using SAEF with EE so I have a lot to learn…
    [edit]
    Not able to get this to create a popup with the following for a custom related field

    {exp:pops:pop_input field="f_far_left"}
    <label for="{field_name}">Far Left</label>
    {popup}
    <input type="hidden" name="{field_format}" value="none" />
    {/exp:pops:pop_input}

    The field_label and field_format do get parsed though

    <label for="field_id_20">Far Left</label>
            
    <input type="hidden" name="field_ft_20" value="none" />

    I can use firebug to get values from the plugin so is there anything I *should* see so I can perhaps debug what I am doing wrong?

    Thanks!

  • #22 / Jan 14, 2010 10:11am

    Wil Linssen

    49 posts

    I had need for a relationship dropdown today so I’ve put together a plugin to retrieve a custom field, and if necessary also it’s options in a variable pair. It’s available on my website if you need it.

    So…

    {exp:linssen_saef_field name="my_relationship_field"}
      <label for="{id}">{label}</label>
    
        <select name="{id}" id="{id}">
          {options}<option value="{value}">{name}</option>{/options}
        </select>
      
    {/exp:linssen_saef_field}

    And for a text field:

    {exp:linssen_saef_field name="my_text_field"}
      <label for="{id}">{label}</label>
    
        <input type="text" name="{id}" id="{id}" value="" />
      
    {/exp:linssen_saef_field}
  • #23 / Jan 14, 2010 10:25am

    wecreateyou

    86 posts

    That’s great don’t have a lot of time to check it out this week but it definitely will get put to good use eventually!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases