• Hi,

    I have this dropdown

    [select* restaurant first_as_label
    “W?hle den Empf?nger aus:|—”
    “Juergen|kling@kab***net.at”
    “Pinky|pinky@kab***i.at”
    “Ratte|pinky@kab***i.at” ]

    This works fine for the first two options

    #1
    [raw_restaurant] -> kling@kab***net.at
    [restaurant] -> Juergen

    #2
    [raw_restaurant] -> pinky@kab***i.at
    [restaurant] -> Pinky

    But if someone selects Ratte, I get back Pinky again instead of Ratte.

    #3
    [raw_restaurant] -> pinky@kab***i.at
    [restaurant] -> Pinky

    I need two recipients with different names but the same adress.

    Why does not the script handle each string separate?
    Do you use the value of an option as unique id somehow?

    Mails are anonymized in this sample by ***

    Best regards
    Jürgen`

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter jkling

    (@jkling)

    I have studied the docs and stackoverflow before I have posted my request.
    But if you have 2 equal values, always the output is always the first name-value-pair of those, even the second is selected.

    When I switch the order, the results come with the same pattern.

    [select* restaurant first_as_label
    “W?hle den Empf?nger aus:|—”
    “Juergen|kling@kab***net.at”
    “Ratte|pinky@kab***i.at”
    “Pinky|pinky@kab***i.at” ]`

    #3
    [raw_restaurant] -> pinky@kab***i.at
    [restaurant] -> Ratte

    I have solved this with a workaround.

    —–Form—

    [hidden my_selceted_name id:my_selceted_name]

    [select* my_select id:my_selectt first_as_label
    “Select:|—”
    “name-a|value-a”
    “name-b|value-b”
    “name-c|value-c” ]

    —– JS —————
    jQuery(‘#my_select’).on(‘change’, function(){
    var mySelectName = jQuery(this).find(‘option:selected’).text();
    mySelectName = jQuery.trim(mySelectName);
    jQuery(‘#my_selceted_name’).val(mySelectName );
    /* console.log(my_selceted_name); */
    });

    ——- email if option “c” is selected ——————-

    [my_select] = name-b
    [_raw_my_select] = value-c
    [my_selceted_name] = name-c`

    • This reply was modified 2 years, 9 months ago by jkling.
    • This reply was modified 2 years, 9 months ago by jkling.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘conflict with name and value’ is closed to new replies.