This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

nesste
nesste

I have a dropdown with multiple posts and when I select one I want to get the value from that post and use it in the post's controller. On my select tag I have a data-request="onChange" but I can't seem to figure out how to get the value.

marsflow
marsflow

Dropdown in your backand form is depend on its model

$model = new MyModel;
$var = $model->yourdropdown;

But its only get the array key, i dont know how to get its label. In my case, my dropdown options reference from database. then, i Select my table to get its value by using key from dropdown as condition. I konw that must be another way but i dont found yet. PS : sorry for my English

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.