Field related with Simple (custom defined list) in a form
-
I am making a form and I need a field related to a Simple (custom defined list). I have written this code and it shows the options of the whole field, not the Simple (custom defined list) Is ‘options’ the word to substitute?
thanks
<label for="coleccion_serie">Colección/Serie:</label> <select name="coleccion_serie" id="coleccion_serie" required> <?php $coleccion_serie_field = pods('libro')->fields('coleccion_serie'); $coleccion_serie_values = $coleccion_serie_field['options']; foreach ($coleccion_serie_values as $value => $label) { echo '<option value="' . $value . '">' . $label . '</option>'; } ?> </select><br><br>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Field related with Simple (custom defined list) in a form’ is closed to new replies.