| @@ -27,17 +27,17 @@ | ||
| 27 | 27 | 'icon' => 'frm_icon_font frm_radio_checked_icon', |
| 28 | 28 | ), |
| 29 | 29 | 'select' => array( |
| 30 | 30 | 'name' => __( 'Dropdown', 'formidable' ), |
| 31 | - 'icon' => 'frm_icon_font frm_dropdown_icon', | |
| 31 | + 'icon' => 'frm_icon_font frm_caret_square_down_icon', | |
| 32 | 32 | ), |
| 33 | 33 | 'email' => array( |
| 34 | 34 | 'name' => __( 'Email', 'formidable' ), |
| 35 | - 'icon' => 'frm_icon_font frm_email2_icon', | |
| 35 | + 'icon' => 'frm_icon_font frm_email_icon', | |
| 36 | 36 | ), |
| 37 | 37 | 'url' => array( |
| 38 | 38 | 'name' => __( 'Website/URL', 'formidable' ), |
| 39 | - 'icon' => 'frm_icon_font frm_link2_icon', | |
| 39 | + 'icon' => 'frm_icon_font frm_link_icon', | |
| 40 | 40 | ), |
| 41 | 41 | 'number' => array( |
| 42 | 42 | 'name' => __( 'Number', 'formidable' ), |
| 43 | 43 | 'icon' => 'frm_icon_font frm_hashtag_icon', |
| @@ -51,25 +51,25 @@ | ||
| 51 | 51 | 'icon' => 'frm_icon_font frm_phone_icon', |
| 52 | 52 | ), |
| 53 | 53 | 'html' => array( |
| 54 | 54 | 'name' => __( 'HTML', 'formidable' ), |
| 55 | - 'icon' => 'frm_icon_font frm_code2_icon', | |
| 55 | + 'icon' => 'frm_icon_font frm_code_icon', | |
| 56 | 56 | ), |
| 57 | 57 | 'hidden' => array( |
| 58 | 58 | 'name' => __( 'Hidden', 'formidable' ), |
| 59 | - 'icon' => 'frm_icon_font frm_eye_slash2_icon', | |
| 59 | + 'icon' => 'frm_icon_font frm_eye_slash_icon', | |
| 60 | 60 | ), |
| 61 | 61 | 'user_id' => array( |
| 62 | 62 | 'name' => __( 'User ID', 'formidable' ), |
| 63 | - 'icon' => 'frm_icon_font frm_user2_icon', | |
| 63 | + 'icon' => 'frm_icon_font frm_user_icon', | |
| 64 | 64 | ), |
| 65 | 65 | 'captcha' => array( |
| 66 | 66 | 'name' => self::get_captcha_field_name(), |
| 67 | - 'icon' => 'frm_icon_font frm_shield_check2_icon', | |
| 67 | + 'icon' => 'frm_icon_font frm_shield_check_icon', | |
| 68 | 68 | ), |
| 69 | 69 | 'credit_card' => array( |
| 70 | 70 | 'name' => __( 'Payment', 'formidable' ), |
| 71 | - 'icon' => 'frm_icon_font frm_credit_card2_icon', | |
| 71 | + 'icon' => 'frm_icon_font frm_credit_card_icon', | |
| 72 | 72 | ), |
| 73 | 73 | FrmSubmitHelper::FIELD_TYPE => array( |
| 74 | 74 | 'name' => __( 'Submit', 'formidable' ), |
| 75 | 75 | 'hide' => true, |
| @@ -100,9 +100,9 @@ | ||
| 100 | 100 | $images_url = FrmAppHelper::plugin_url() . '/images/'; |
| 101 | 101 | $fields = array( |
| 102 | 102 | 'file' => array( |
| 103 | 103 | 'name' => __( 'File Upload', 'formidable' ), |
| 104 | - 'icon' => 'frm_icon_font frm_upload3_icon', | |
| 104 | + 'icon' => 'frm_icon_font frm_upload_icon', | |
| 105 | 105 | 'message' => __( 'Add file uploads to save time and cut down on back-and-forth. Upgrade to Pro to get Upload fields and more.', 'formidable' ), |
| 106 | 106 | ), |
| 107 | 107 | 'ranking' => array(), |
| 108 | 108 | 'rte' => array( |
| @@ -110,9 +110,9 @@ | ||
| 110 | 110 | 'icon' => 'frm_icon_font frm_align_right_icon', |
| 111 | 111 | ), |
| 112 | 112 | 'date' => array( |
| 113 | 113 | 'name' => __( 'Date', 'formidable' ), |
| 114 | - 'icon' => 'frm_icon_font frm_calendar2_icon', | |
| 114 | + 'icon' => 'frm_icon_font frm_calendar_icon', | |
| 115 | 115 | ), |
| 116 | 116 | 'time' => array( |
| 117 | 117 | 'name' => __( 'Time', 'formidable' ), |
| 118 | 118 | 'icon' => 'frm_icon_font frm_clock_icon', |
| @@ -123,9 +123,9 @@ | ||
| 123 | 123 | 'message' => esc_html__( 'Add a set of radio buttons with whatever range you choose.', 'formidable' ) . '<img src="' . esc_url( $images_url ) . 'scale_field.png" alt="' . esc_attr__( 'Scale Field', 'formidable' ) . '" />', |
| 124 | 124 | ), |
| 125 | 125 | 'star' => array( |
| 126 | 126 | 'name' => __( 'Star Rating', 'formidable' ), |
| 127 | - 'icon' => 'frm_icon_font frm_star2_icon', | |
| 127 | + 'icon' => 'frm_icon_font frm_star_icon', | |
| 128 | 128 | ), |
| 129 | 129 | 'range' => array( |
| 130 | 130 | 'name' => __( 'Slider', 'formidable' ), |
| 131 | 131 | 'icon' => 'frm_icon_font frm_code_commit_icon', |
| @@ -135,9 +135,9 @@ | ||
| 135 | 135 | 'icon' => 'frm_icon_font frm_toggle_on_icon', |
| 136 | 136 | ), |
| 137 | 137 | 'data' => array( |
| 138 | 138 | 'name' => __( 'Dynamic', 'formidable' ), |
| 139 | - 'icon' => 'frm_icon_font frm_dynamic_icon', | |
| 139 | + 'icon' => 'frm_icon_font frm_sitemap_icon', | |
| 140 | 140 | 'message' => __( 'Create relationships between multiple forms. You can link a member to a team, a rating to a product, a comment to a submission, and much more.', 'formidable' ), |
| 141 | 141 | ), |
| 142 | 142 | 'lookup' => array( |
| 143 | 143 | 'name' => __( 'Lookup', 'formidable' ), |
| @@ -145,9 +145,9 @@ | ||
| 145 | 145 | 'message' => esc_html__( 'Filter the options in the next field and automatically add values to other fields. Upgrade to Pro to get Lookup fields and more.', 'formidable' ) . ' <img src="' . esc_url( $images_url ) . 'look-up_year-make-model.gif" alt="' . esc_attr__( 'cascading lookup fields', 'formidable' ) . '" />', |
| 146 | 146 | ), |
| 147 | 147 | 'divider|repeat' => array( |
| 148 | 148 | 'name' => __( 'Repeater', 'formidable' ), |
| 149 | - 'icon' => 'frm_icon_font frm_refresh_icon', | |
| 149 | + 'icon' => 'frm_icon_font frm_repeater_icon', | |
| 150 | 150 | 'message' => esc_html__( 'Allow your visitors to add new sets of fields while filling out forms. Increase conversions while saving building time and server resources.', 'formidable' ) . ' <img src="' . esc_url( $images_url ) . 'repeatable-section_frontend.gif" alt="' . esc_attr__( 'Dynamically Add Form Fields with repeatable sections', 'formidable' ) . '" />', |
| 151 | 151 | ), |
| 152 | 152 | 'end_divider' => array( |
| 153 | 153 | 'name' => __( 'Section Buttons', 'formidable' ), |
| @@ -163,9 +163,9 @@ | ||
| 163 | 163 | 'message' => __( 'Get multi-paged forms with progress bars. Did you know you can upgrade to PRO to unlock multi-step forms with more awesome features?', 'formidable' ), |
| 164 | 164 | ), |
| 165 | 165 | 'form' => array( |
| 166 | 166 | 'name' => __( 'Embed Form', 'formidable' ), |
| 167 | - 'icon' => 'frm_icon_font frm_file_text2_icon', | |
| 167 | + 'icon' => 'frm_icon_font frm_file_text_icon', | |
| 168 | 168 | ), |
| 169 | 169 | 'likert' => array( |
| 170 | 170 | 'name' => __( 'Likert Scale', 'formidable' ), |
| 171 | 171 | 'icon' => 'frm_icon_font frm_likert_scale frm_show_upgrade', |
| @@ -177,13 +177,13 @@ | ||
| 177 | 177 | 'addon' => 'surveys', |
| 178 | 178 | ), |
| 179 | 179 | 'password' => array( |
| 180 | 180 | 'name' => __( 'Password', 'formidable' ), |
| 181 | - 'icon' => 'frm_icon_font frm_lock_closed2_icon', | |
| 181 | + 'icon' => 'frm_icon_font frm_lock_open_icon', | |
| 182 | 182 | ), |
| 183 | 183 | 'tag' => array( |
| 184 | 184 | 'name' => __( 'Tags', 'formidable' ), |
| 185 | - 'icon' => 'frm_icon_font frm_price_tags2_icon', | |
| 185 | + 'icon' => 'frm_icon_font frm_price_tags_icon', | |
| 186 | 186 | ), |
| 187 | 187 | // This is no longer a Pro field, but without this here, Pro triggers "undefined index" notices. |
| 188 | 188 | // Right now it leaves a gap. Maybe we can skip anything without a name or something. |
| 189 | 189 | 'credit_card' => array( |
| @@ -191,13 +191,13 @@ | ||
| 191 | 191 | 'icon' => '', |
| 192 | 192 | ), |
| 193 | 193 | 'address' => array( |
| 194 | 194 | 'name' => __( 'Address', 'formidable' ), |
| 195 | - 'icon' => 'frm_icon_font frm_location2_icon', | |
| 195 | + 'icon' => 'frm_icon_font frm_location_icon', | |
| 196 | 196 | ), |
| 197 | 197 | 'summary' => array( |
| 198 | 198 | 'name' => __( 'Summary', 'formidable' ), |
| 199 | - 'icon' => 'frm_icon_font frm_file_text3_icon', | |
| 199 | + 'icon' => 'frm_icon_font frm_file_text_icon', | |
| 200 | 200 | 'message' => __( 'Allow visitors to review their responses before a form is submitted. Upgrade to Pro to get Summary fields and more.', 'formidable' ), |
| 201 | 201 | ), |
| 202 | 202 | 'signature' => array( |
| 203 | 203 | 'name' => __( 'Signature', 'formidable' ), |
| @@ -205,15 +205,15 @@ | ||
| 205 | 205 | 'addon' => 'signature', |
| 206 | 206 | ), |
| 207 | 207 | 'ai' => array( |
| 208 | 208 | 'name' => __( 'AI', 'formidable' ), |
| 209 | - 'icon' => 'frm_icon_font frm-ai-icon frm_show_upgrade', | |
| 209 | + 'icon' => 'frm_icon_font frm_eye_icon frm_show_upgrade', | |
| 210 | 210 | 'addon' => 'ai', |
| 211 | 211 | 'message' => __( 'Streamline workflows and reclaim valuable time with the power of AI. You can effortlessly respond to your visitors in real-time with ChatGPT as your automated assistant. Upgrade to Pro and unlock AI-powered fields.', 'formidable' ), |
| 212 | 212 | ), |
| 213 | 213 | 'ssa-appointment' => array( |
| 214 | 214 | 'name' => __( 'Appointment', 'formidable' ), |
| 215 | - 'icon' => 'frm_icon_font frm_schedule_icon frm_show_upgrade', | |
| 215 | + 'icon' => 'frm_icon_font frm_calendar_icon frm_show_upgrade', | |
| 216 | 216 | 'require' => 'Simply Schedule Appointments', |
| 217 | 217 | 'message' => sprintf( |
| 218 | 218 | /* translators: %1$s: Link opening HTML, %2$s: Link tag closing */ |
| 219 | 219 | esc_html__( 'Appointment fields are an integration with %1$sSimply Schedule Appointments%2$s. Get started now to schedule appointments directly from your forms.', 'formidable' ), |
| @@ -223,9 +223,9 @@ | ||
| 223 | 223 | 'link' => 'https://simplyscheduleappointments.com/meet/formidable/', |
| 224 | 224 | ), |
| 225 | 225 | 'product' => array( |
| 226 | 226 | 'name' => __( 'Product', 'formidable' ), |
| 227 | - 'icon' => 'frm_icon_font frm_product2_icon', | |
| 227 | + 'icon' => 'frm_icon_font frm_product_icon', | |
| 228 | 228 | 'section' => 'pricing', |
| 229 | 229 | ), |
| 230 | 230 | 'quantity' => array( |
| 231 | 231 | 'name' => __( 'Quantity', 'formidable' ), |
| @@ -233,9 +233,9 @@ | ||
| 233 | 233 | 'section' => 'pricing', |
| 234 | 234 | ), |
| 235 | 235 | 'total' => array( |
| 236 | 236 | 'name' => __( 'Total', 'formidable' ), |
| 237 | - 'icon' => 'frm_icon_font frm_total2_icon', | |
| 237 | + 'icon' => 'frm_icon_font frm_total_icon', | |
| 238 | 238 | 'section' => 'pricing', |
| 239 | 239 | ), |
| 240 | 240 | ); |
| 241 | 241 | |
| @@ -376,9 +376,9 @@ | ||
| 376 | 376 | public static function create( $values, $return = true ) { |
| 377 | 377 | global $wpdb, $frm_duplicate_ids; |
| 378 | 378 | |
| 379 | 379 | $new_values = array(); |
| 380 | - $key = $values['field_key'] ?? $values['name']; | |
| 380 | + $key = isset( $values['field_key'] ) ? $values['field_key'] : $values['name']; | |
| 381 | 381 | $new_values['field_key'] = FrmAppHelper::get_unique_key( $key, $wpdb->prefix . 'frm_fields', 'field_key' ); |
| 382 | 382 | |
| 383 | 383 | $values = FrmAppHelper::maybe_filter_array( $values, array( 'name', 'description' ) ); |
| 384 | 384 | |
| @@ -1149,9 +1149,9 @@ | ||
| 1149 | 1149 | $set = set_transient( $name, $field, 60 * 60 * 6 ); |
| 1150 | 1150 | if ( ! $set ) { |
| 1151 | 1151 | // the transient didn't save |
| 1152 | 1152 | if ( $name != $base_name ) { |
| 1153 | - // if the first saved an others fail, this will show an incomplete form | |
| 1153 | + // if the first saved an others fail, this will show an incmoplete form | |
| 1154 | 1154 | self::delete_form_transient( $form_id ); |
| 1155 | 1155 | } |
| 1156 | 1156 | |
| 1157 | 1157 | return; |
| @@ -1383,9 +1383,9 @@ | ||
| 1383 | 1383 | * @param string $option |
| 1384 | 1384 | * @return mixed |
| 1385 | 1385 | */ |
| 1386 | 1386 | public static function get_option_in_object( $field, $option ) { |
| 1387 | - return $field->field_options[ $option ] ?? ''; | |
| 1387 | + return isset( $field->field_options[ $option ] ) ? $field->field_options[ $option ] : ''; | |
| 1388 | 1388 | } |
| 1389 | 1389 | |
| 1390 | 1390 | /** |
| 1391 | 1391 | * @since 2.0.09 |