@@ 2455-2465 (lines=11) @@ | ||
2452 | $r .= "\t\t<textarea name='" . esc_attr( $field_id ) . "' id='contact-form-comment-" . esc_attr( $field_id ) . "' rows='20' " . $field_class . $field_placeholder . " " . ( $field_required ? "required aria-required='true'" : "" ) . ">" . esc_textarea( $field_value ) . "</textarea>\n"; |
|
2453 | $r .= "\t</div>\n"; |
|
2454 | break; |
|
2455 | case 'radio' : |
|
2456 | $r .= "\t<div><label class='grunion-field-label" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . $required_field_text . '</span>' : '' ) . "</label>\n"; |
|
2457 | foreach ( $this->get_attribute( 'options' ) as $option ) { |
|
2458 | $option = Grunion_Contact_Form_Plugin::strip_tags( $option ); |
|
2459 | $r .= "\t\t<label class='grunion-radio-label radio" . ( $this->is_error() ? ' form-error' : '' ) . "'>"; |
|
2460 | $r .= "<input type='radio' name='" . esc_attr( $field_id ) . "' value='" . esc_attr( $option ) . "' " . $field_class . checked( $option, $field_value, false ) . " " . ( $field_required ? "required aria-required='true'" : "" ) . "/> "; |
|
2461 | $r .= esc_html( $option ) . "</label>\n"; |
|
2462 | $r .= "\t\t<div class='clear-form'></div>\n"; |
|
2463 | } |
|
2464 | $r .= "\t\t</div>\n"; |
|
2465 | break; |
|
2466 | case 'checkbox' : |
|
2467 | $r .= "\t<div>\n"; |
|
2468 | $r .= "\t\t<label class='grunion-field-label checkbox" . ( $this->is_error() ? ' form-error' : '' ) . "'>\n"; |
|
@@ 2485-2495 (lines=11) @@ | ||
2482 | } |
|
2483 | $r .= "\t\t</div>\n"; |
|
2484 | break; |
|
2485 | case 'select' : |
|
2486 | $r .= "\n<div>\n"; |
|
2487 | $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label select" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>'. $required_field_text . '</span>' : '' ) . "</label>\n"; |
|
2488 | $r .= "\t<select name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' " . $field_class . ( $field_required ? "required aria-required='true'" : "" ) . ">\n"; |
|
2489 | foreach ( $this->get_attribute( 'options' ) as $option ) { |
|
2490 | $option = Grunion_Contact_Form_Plugin::strip_tags( $option ); |
|
2491 | $r .= "\t\t<option" . selected( $option, $field_value, false ) . ">" . esc_html( $option ) . "</option>\n"; |
|
2492 | } |
|
2493 | $r .= "\t</select>\n"; |
|
2494 | $r .= "\t</div>\n"; |
|
2495 | break; |
|
2496 | case 'date' : |
|
2497 | $r .= "\n<div>\n"; |
|
2498 | $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label " . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . $required_field_text . '</span>' : '' ) . "</label>\n"; |