| @@ -752,16 +752,9 @@ | ||
| 752 | 752 | * @param array $field |
| 753 | 753 | * @param array $add_html |
| 754 | 754 | */ |
| 755 | 755 | private static function maybe_add_html_required( $field, array &$add_html ) { |
| 756 | - $excluded_field_types = | |
| 757 | - FrmField::is_radio( $field ) || | |
| 758 | - FrmField::is_checkbox( $field ) || | |
| 759 | - FrmField::is_field_type( $field, 'file' ) || | |
| 760 | - FrmField::is_field_type( $field, 'nps' ) || | |
| 761 | - FrmField::is_field_type( $field, 'scale' ); | |
| 762 | - | |
| 763 | - if ( $excluded_field_types ) { | |
| 756 | + if ( in_array( $field['type'], array( 'file', 'data', 'lookup' ), true ) ) { | |
| 764 | 757 | return; |
| 765 | 758 | } |
| 766 | 759 | |
| 767 | 760 | $include_html = FrmAppHelper::meets_min_pro_version( '3.06.01' ); |
| @@ -774,12 +767,8 @@ | ||
| 774 | 767 | if ( FrmField::is_option_empty( $field, 'shortcodes' ) ) { |
| 775 | 768 | return; |
| 776 | 769 | } |
| 777 | 770 | |
| 778 | - if ( ! empty( $field['autocomplete'] ) ) { | |
| 779 | - unset( $field['shortcodes']['autocomplete'] ); | |
| 780 | - } | |
| 781 | - | |
| 782 | 771 | foreach ( $field['shortcodes'] as $k => $v ) { |
| 783 | 772 | if ( 'opt' === $k ) { |
| 784 | 773 | continue; |
| 785 | 774 | } |
| @@ -885,9 +874,12 @@ | ||
| 885 | 874 | * |
| 886 | 875 | * @deprecated 4.0 Moved to Pro for Other option only. |
| 887 | 876 | */ |
| 888 | 877 | public static function add_option() { |
| 889 | - _deprecated_function( __METHOD__, '4.0', 'FrmProFieldsController::add_other_option' ); | |
| 878 | + _deprecated_function( __METHOD__, '4.0', 'FrmProFormsController::add_other_option' ); | |
| 879 | + if ( is_callable( 'FrmProFormsController::add_other_option' ) ) { | |
| 880 | + FrmProFormsController::add_other_option(); | |
| 881 | + } | |
| 890 | 882 | } |
| 891 | 883 | |
| 892 | 884 | /** |
| 893 | 885 | * @deprecated 4.0 |
| @@ -915,6 +907,22 @@ | ||
| 915 | 907 | * @return array |
| 916 | 908 | */ |
| 917 | 909 | public static function include_single_field( $field_id, $values, $form_id = 0 ) { |
| 918 | 910 | return FrmDeprecated::include_single_field( $field_id, $values, $form_id ); |
| 911 | + } | |
| 912 | + | |
| 913 | + /** | |
| 914 | + * @deprecated 2.3 | |
| 915 | + * @codeCoverageIgnore | |
| 916 | + */ | |
| 917 | + public static function edit_option() { | |
| 918 | + FrmDeprecated::deprecated( __METHOD__, '2.3' ); | |
| 919 | + } | |
| 920 | + | |
| 921 | + /** | |
| 922 | + * @deprecated 2.3 | |
| 923 | + * @codeCoverageIgnore | |
| 924 | + */ | |
| 925 | + public static function delete_option() { | |
| 926 | + FrmDeprecated::deprecated( __METHOD__, '2.3' ); | |
| 919 | 927 | } |
| 920 | 928 | } |