Nick7229476
Posts: 0
Joined: Mon Nov 17, 2014 9:27 am

Select box

I'm still getting the url posted to the category field in the database...
Rather than the Category "name" e.g. Clwb Rygbi.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Select box

Hi Nick,

Currently i see correct behavior(as i understand it).

So when you choose some category - appropriate URL should be filled in "Dolen" input.

Regards.

Nick7229476
Posts: 0
Joined: Mon Nov 17, 2014 9:27 am

Select box

Thanks.
Yes, this is working correct now, many thanks.

But I ALSO want the select box to make a second entry into the database; the category name into the "categori" column in the screen grab below.

So the select box has 2 functions:
1) To populate the box "Dolen" with the url & this is being successfully recoded in to the database.
2) To record the "Category" (associated with the url) that was selected & record the value into the next column of the database "categori".

Image

Currently the url is being saved to both columns (see first row of screen grab above), rather than the second row where the entry was recoded correctly.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Select box

Hi Nick,

Please follow these steps:

  1. open you create/update service mapping

  2. find link to category.

  3. Click "JS".

  4. Populate it with following JS code:

    pre

    //Note: replace "selectName" with your select component name.
    var currentValue = Apperyio("selectName").val();
    var currentOption = Apperyio("selectName").find('option[value="' + currentValue + '"]');
    var currentView = currentOption.text();
    return currentView;

    /pre

    Regards.

Return to “Issues”