Skip to content

Instantly share code, notes, and snippets.

@kreamweb
Created October 16, 2017 07:52
Show Gist options
  • Select an option

  • Save kreamweb/52f3668fe0aed44d95c5c14549acb8d6 to your computer and use it in GitHub Desktop.

Select an option

Save kreamweb/52f3668fe0aed44d95c5c14549acb8d6 to your computer and use it in GitHub Desktop.
How replace the input text box with a select
<?php if( $optional_form_text_field ): ?>
<p class="form-row form-row-wide validate-required" id="rqa_text_field_row">
<label for="rqa_text_field_row" class=""><?php echo get_option('ywraq_additional_text_field_label') ?>
<?php if ( $optional_form_text_field_required == 'required' ) : ?>
<abbr class="required" title="required">*</abbr></label>
<?php endif ?>
<select class="input-text " name="rqa_text_field" id="rqa-text-field" <?php echo $optional_form_text_field_required ?>>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
<option value="4">Option 4</option>
<option value="5">Option 5</option>
</select>
</p>
<?php endif ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment