x
1
2
3
4
5
6
<div class="space-y-4"> <label class="label block " for="form_component_preview_test_model_favorite_fruits">Favorite fruits</label> <select name="form_component_preview_test_model[favorite_fruits]" id="form_component_preview_test_model_favorite_fruits"><option value="orange">Orange</option> <option value="banana">Banana</option> <option selected="selected" value="apple">Apple</option></select></div>1
2
custom_model = TestModel.new(favorite_fruits: [ "apple" ])render(DropdownComponent.new(form: form(model: custom_model), method: :favorite_fruits, collection: self.class.fruit_options, item_value_method: :value, item_label_method: :label))No notes provided.
No params configured.