All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Select list on front end form

ScottBoyde 3 May 2015 17:35 question, complete

Could you assist me with an example for a Select list on a form

I have the following on my form

{exp:low_variables:options var="lv_gender"}
{lv_gender}
{/exp:low_variables:options}

My lv_gender is a select type with two options Male and Female. I will pass selected from custom module tag, but the select list is not showing my two options.

Thanks

Replies

  1. Low 4 May 2015 15:42

    Try using {lv_gender:data} and {lv_gender:label} instead of {lv_gender} inside the tag.

  2. ScottBoyde 5 May 2015 13:37

    Cheers, I had found that out and meant to reply earlier.

    I am using this with a custom module and want the saved option as the selected option, my field is gender from edit_player. How do I add that to the low_variables.

    {exp:clubmanager:edit_player
    id="{segment_3}"
    return="clubhouse/players"
    }

    {exp:low_variables:options var="lv_gender"}
    {lv_gender:data_label}
    {/exp:low_variables:options}

    {/exp:clubmanager:edit_player}

  3. Low 5 May 2015 16:04

    You should be able to use {selected} for that, as per the docs: http://gotolow.com/addons/low-variabl...

  4. ScottBoyde 5 May 2015 16:30

    Sorry I copied in the wrong template code

    I am using the following

    {exp:low_variables:options var="lv_role"}
    {lv_role:data_label}
    {/exp:low_variables:options}

    I am using this with a custom module I am building and would like this one to have {gender} from the custom module as the initial value of the selected option, can I do that.

  5. Low 5 May 2015 16:33

    You could perhaps a conditional? {if gender == lv_role:data}selected{/if}

  6. ScottBoyde 5 May 2015 17:20

    That's it many thanks.

    Is it possible for me to use low variables and wygwam as a field type in my custom form and get and save its contents to one of its fields.

    I have a field called profile that I would like to have a wysiwyg for but not sure how to get it on a form through a custom module

  7. Low 5 May 2015 17:27

    Front-end forms are not supported by LV, but you could go ahead and make it yourself. But, again, that's not supported by me.

  8. ScottBoyde 5 May 2015 17:32

    I have form built and working and the above helped with a couple of selects I have.

    Just thought I might be able to use the low variables wygwam for another field.

    But many thanks for the help so far I will look for an alternative for this field.

  9. ScottBoyde 5 May 2015 19:09

    You woundn't have any pointers as to where I should look to get wysiwyg on a textarea in a template that's not using channels

  10. Low 6 May 2015 15:48

    You can try http://expressionengine.stackexchange...