set a selected items

Home Forum General set a selected items

This topic contains 5 replies, has 0 voices, and was last updated by  Anonymous 9 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #496

    Anonymous

    is it possible to set the selected item in a drop-down? if so, how can we do that?

    thanks,

    paul

    #5260

    ijobling
    Participant

    Please explain in more detail what you mean ? You can define the ‘default’ selected item in the drop down as it is presented on the form from the drop down properties. When a user has selected an item from the drop down it is selected, and you can run a script to write/set this selection out to another field using the Set Field script (using either the value of the selected item or the caption)

    Other than that though, not sure what you are trying to ask

    #5261

    Anonymous

    for instance, let’s say we have a drop-down with the following items:

    dog

    cat

    rabbit

    is there a way to dynamically set the selected item(s)? if, for instance, the user is a reviewer and trying to look over a form someone had previously filled out, how can we set the previously selected item in the drop-down?

    another example would be if the person had previously selected states from a u.s. state’s list input. if they went in to adjust their answers at a later time, how can we set those previously selected states again?

    essentially, is there a way to access the “selected” property of drop-down and list objects programmatically so we can say “set item ‘cat’ as selected” or “set items ‘ohio’,’texas’, and ‘new york’ as selected”?

    thanks,

    paul

    #5262

    ijobling
    Participant

    Once the user has selected from the drop down, that selection is stored so unless you have another ‘action’ that is overwriting this field for a future stage what they selected will still be visible to users throughout future stages.

    From what you are asking I think you may have this situation. Are you for instance populating this drop down from a connect action? If so, refer to this post

    http://www.perfectforms.com/forums/topic/saving-values-of-drop-downs-in-future-stages#post-772

    You can though use the ‘set field’ script to set the selection item in a drop down where you can set the drop down to a specific item by using the VALUE for that selection. ie if in your case here ‘cat’ has the value of 2 for its item, set up the set field to the required drop down and then enter 2 into the ‘text or number’ field in the value property in the set field script

    if this still isn’t helping, perhaps will be clearer if you can set up an example form to show what you want to do and send over to us via the support ticket

    #5263

    Anonymous

    great! that’s what we needed for the drop-downs. thanks for the responses.

    out of curiosity, i see that we can also select items in the list object using the same “set field” action. is there a way to set multiple selections in the list object?

    thanks,

    paul

    #5264

    ijobling
    Participant

    Afraid not, if you use separate ‘set field’ actions for each of the item values, the last set field will overwrite the previous ones

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.