field-controls.php
1 year ago
field-header.php
1 year ago
field-label.php
1 week ago
field-name.php
1 year ago
field-text.php
1 year ago
field-type.php
1 year ago
field-name.php
24 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Field Name |
| 4 | * |
| 5 | * Disabled inputs are not posted so store the field name in a hidden input. |
| 6 | */ |
| 7 | ?> |
| 8 | <tr class="field-name-row"> |
| 9 | <th><?php echo esc_html_x( 'Name', 'noun', 'strong-testimonials' ); ?></th> |
| 10 | <td> |
| 11 | <?php |
| 12 | // Field names for certain types are read-only. |
| 13 | if ( $field['name_mutable'] ) : |
| 14 | ?> |
| 15 | <input class="field-name" type="text" name="fields[<?php echo esc_attr( $key ); ?>][name]" value="<?php echo isset( $field['name'] ) ? esc_attr( $field['name'] ) : ''; ?>"> |
| 16 | <span class="help field-name-help"><?php esc_html_e( 'Use only lowercase letters, numbers, and underscores.', 'strong-testimonials' ); ?></span> |
| 17 | <span class="help field-name-help important"><?php esc_html_e( 'Cannot be "name" or "date".', 'strong-testimonials' ); ?></span> |
| 18 | <?php else : ?> |
| 19 | <input class="field-name" type="text" value="<?php echo esc_attr( $field['name'] ); ?>" disabled="disabled"> |
| 20 | <input type="hidden" name="fields[<?php echo esc_attr( $key ); ?>][name]" value="<?php echo esc_attr( $field['name'] ); ?>"> |
| 21 | <?php endif ?> |
| 22 | </td> |
| 23 | </tr> |
| 24 |