Open josegus opened 5 years ago
I need to render categories as dropdown, but need the first element to be empty. How can i set a default "Select one" with empty value and custom text?
Just add placeholder('','None') before calling the render function.
Example:
<?php Category::attr(['name' => 'categories']) ->selected(2) ->placeholder('','None') ->renderAsDropdown();
I need to render categories as dropdown, but need the first element to be empty. How can i set a default "Select one" with empty value and custom text?