select in form

select in form

sitoryusitoryu Posts: 5Questions: 1Answers: 0


hello, I need put select(dropdown) to editable form in "editor".
do someone have example?
Tnx

1.JPG 34.6K

Replies

  • sitoryusitoryu Posts: 5Questions: 1Answers: 0

    Thank you for quick responce :)
    I find examples, but still with problem - I couldn't send correct from server side(PHP) the option of element that will be automaticly seleceted in JS*
    php:
    array(
    "id" => (int)$val['id'],
    "name" => $val['name'],
    "email" => $val['email'],
    "category" => $val['category'],
    "password" => $val['password'],
    "status" => (int)$val['status']
    )
    js:
    label: "category:",
    name: 'category',
    type: "select",
    options: [
    { label: "regular", value: "1" },
    { label: "VIP", value: "2" },
    { label: "another", value: "3" }
    ]

  • allanallan Posts: 63,461Questions: 1Answers: 10,466 Site admin

    Yes - the select field is the way to do this.

    If this example doesn't help to resolve the problem, could you post your full Javascript code please, and also the JSON response from the server when loading the data?

    Allan

This discussion has been closed.