Skip to content

Commit

Permalink
Merge pull request #44 from bu-ist/fix/hide-select
Browse files Browse the repository at this point in the history
Fix/hide select
  • Loading branch information
anton-kachurin authored Feb 1, 2019
2 parents 9014f9f + 9de782f commit 578eeed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/form-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
if ( isset( $field->hidden ) && $field->hidden && ('select' !== $field->htmlElement || $field->hidden_value) ) : ?>
<input type="hidden" name="<?php echo esc_attr($field->id);?>" value="<?php echo esc_attr($field->hidden_value);?>">
<?php
elseif ( isset( $field->hidden ) && $field->hidden && 'select' == $field->htmlElement && isset( $field->default ) && $field->default ): ?>
<input type="hidden" name="<?php echo esc_attr($field->id);?>" value="<?php echo esc_attr($field->default);?>">
<?php
// Begin handler for two types of html elements: input-text or select.
elseif ( 'input-text' == $field->htmlElement ) :
// Begin input text handler.
Expand Down

0 comments on commit 578eeed

Please sign in to comment.