Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to create empty value?
  • How to create empty option value in select drop down with Form::select? Something like:
    <select>
       <option value="">Select value</option>
       <option value="1">Value 1</option>
       <option value="2">Value 2</option>
    </select>
  • Just figured it out... You need to add empty key value into array of select values:

    $values[''] = 'Select value';
    $values[1] = 'Value 1';
    $values[2] = 'Value 2';

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion