You appear to be a bot. Output may be restricted
Description
Set the field to required if that's the case.Sets #extras to "required" for HTML5 validation of the field AND appends a required field marker to the field title
Usage
$array = _bw_form_required_field( $data );
Parameters
- $data
- ( array ) required – field data
Returns
array $data – modified field dataSource
File name: oik-fields/shortcodes/oik-new.phpLines:
1 to 8 of 8
function _bw_form_required_field( $data ) { $required = bw_array_get( $data['#args'], "#required", false ); if ( $required ) { $data['#args']['#extras'] = "required"; $data['#title'] .= bw_default_required_marker(); } return( $data ); }View on GitHub