Skip to content

Commit

Permalink
43305 update logic radio
Browse files Browse the repository at this point in the history
  • Loading branch information
yeneastgate committed Jan 16, 2024
1 parent 51669e5 commit 6af9ff2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates.dist/fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ function renderFormField(string $fieldName, onOffice\WPlugin\Form $pForm, bool $
} elseif ($typeCurrentInput === FieldTypes::FIELD_TYPE_DATATYPE_TINYINT) {
$output = '<fieldset>
<input type="radio" id="' . esc_attr($fieldName) . '_u" name="' . esc_attr($fieldName) . '" value=""
' . ($selectedValue === null ? ' checked' : '') . '>
' . ($selectedValue == '' ? ' checked' : '') . '>
<label for="' . esc_attr($fieldName) . '_u">' . esc_html__('Not Specified', 'onoffice-for-wp-websites') . '</label>
<input type="radio" id="' . esc_attr($fieldName) . '_y" name="' . esc_attr($fieldName) . '" value="1"
' . ($selectedValue == 2 ? 'checked' : '') . '>
' . ($selectedValue == 1 ? 'checked' : '') . '>
<label for="' . esc_attr($fieldName) . '_y">' . esc_html__('Yes', 'onoffice-for-wp-websites') . '</label>
<input type="radio" id="' . esc_attr($fieldName) . '_n" name="' . esc_attr($fieldName) . '" value="0"
' . ($selectedValue == 1 ? 'checked' : '') . '>
' . ($selectedValue == 0 ? 'checked' : '') . '>
<label for="' . esc_attr($fieldName) . '_n">' . esc_html__('No', 'onoffice-for-wp-websites') . '</label>
</fieldset>';
} else {
Expand Down

0 comments on commit 6af9ff2

Please sign in to comment.