Changeset 3389416
- Timestamp:
- 11/04/2025 08:11:33 AM (5 months ago)
- Location:
- formscrm
- Files:
-
- 12 edited
- 1 copied
-
tags/4.0.5 (copied) (copied from formscrm/trunk)
-
tags/4.0.5/formscrm.php (modified) (2 diffs)
-
tags/4.0.5/includes/formscrm-library/class-contactform7.php (modified) (3 diffs)
-
tags/4.0.5/includes/formscrm-library/class-elementor.php (modified) (1 diff)
-
tags/4.0.5/includes/formscrm-library/class-gravityforms.php (modified) (1 diff)
-
tags/4.0.5/includes/formscrm-library/class-wpforms.php (modified) (1 diff)
-
tags/4.0.5/readme.txt (modified) (4 diffs)
-
trunk/formscrm.php (modified) (2 diffs)
-
trunk/includes/formscrm-library/class-contactform7.php (modified) (3 diffs)
-
trunk/includes/formscrm-library/class-elementor.php (modified) (1 diff)
-
trunk/includes/formscrm-library/class-gravityforms.php (modified) (1 diff)
-
trunk/includes/formscrm-library/class-wpforms.php (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
formscrm/tags/4.0.5/formscrm.php
r3378252 r3389416 2 2 /** 3 3 * Plugin Name: FormsCRM 4 * Plugin URI :https://close.technology/wordpress-plugins/formscrm/4 * Plugin URI : https://close.technology/wordpress-plugins/formscrm/ 5 5 * Description: Connects Forms with CRM, ERP and Email Marketing. 6 * Version: 4.0.47 * Author: CloseTechnology8 * Author URI: https://close.technology6 * Version: 4.0.5 7 * Author: CloseTechnology 8 * Author URI: https://close.technology 9 9 * Text Domain: formscrm 10 10 * Domain Path: /languages 11 * License: GPL-2.0+11 * License: GPL-2.0+ 12 12 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 13 13 * … … 24 24 defined( 'ABSPATH' ) || die( 'No script kiddies please!' ); 25 25 26 define( 'FORMSCRM_VERSION', '4.0. 4' );26 define( 'FORMSCRM_VERSION', '4.0.5' ); 27 27 define( 'FORMSCRM_PLUGIN', __FILE__ ); 28 28 define( 'FORMSCRM_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
formscrm/tags/4.0.5/includes/formscrm-library/class-contactform7.php
r3290078 r3389416 177 177 </select> 178 178 </p> 179 179 <p> 180 <label for="wpcf7-crm-fc_crm_mode_expert"><?php esc_html_e( 'Expert Mode', 'formscrm' ); ?></label><br /> 181 <input type="checkbox" id="wpcf7-crm-fc_crm_mode_expert" name="wpcf7-crm[fc_crm_mode_expert]" class="medium" value="on" <?php checked( $cf7_crm['fc_crm_mode_expert'], 'on' ); ?> /><?php esc_html_e( 'Enable this option to show all fields of the CRM.', 'formscrm' ); ?> 182 </p> 180 183 <?php } ?> 181 184 </div> … … 288 291 // Create contact in CRM. 289 292 $this->include_library( $crm_type ); 293 if ( empty( $this->crmlib ) ) { 294 return; 295 } 290 296 $merge_vars = $this->get_merge_vars( $cf7_crm, $submission->get_posted_data() ); 291 297 $response_result = $this->crmlib->create_entry( $cf7_crm, $merge_vars ); … … 306 312 * @return array 307 313 */ 308 private function get_merge_vars( $cf7_crm, $submitted_data ) { 314 public function get_merge_vars( $cf7_crm, $submitted_data ) { 315 if ( empty( $cf7_crm ) || ! is_array( $cf7_crm ) ) { 316 return array(); 317 } 309 318 $merge_vars = array(); 310 319 foreach ( $cf7_crm as $key => $value ) { 311 if ( false !== strpos( $key, 'fc_crm_field' ) ) { 312 $crm_key = str_replace( 'fc_crm_field-', '', $key ); 313 314 if ( ! empty( $submitted_data[ $value ] ) ) { 315 $value = $submitted_data[ $value ]; 316 } 317 318 $merge_vars[] = array( 319 'name' => $crm_key, 320 'value' => $value, 321 ); 322 } 320 if ( false === strpos( $key, 'fc_crm_field' ) ) { 321 continue; 322 } 323 $crm_key = str_replace( 'fc_crm_field-', '', $key ); 324 325 if ( ! empty( $submitted_data[ $value ] ) ) { 326 $value = $submitted_data[ $value ]; 327 } 328 329 if ( is_array( $value ) ) { 330 $value = implode( ',', $value ); 331 } 332 333 $merge_vars[] = array( 334 'name' => $crm_key, 335 'value' => $value, 336 ); 323 337 } 324 338 -
formscrm/tags/4.0.5/includes/formscrm-library/class-elementor.php
r3310866 r3389416 203 203 'fc_crm_type' => formscrm_get_dependency_odoodb(), 204 204 ), 205 ) 206 ); 207 208 // Expert Mode. 209 $widget->add_control( 210 'fc_crm_mode_expert', 211 array( 212 'label' => __( 'Expert Mode', 'formscrm' ), 213 'type' => \Elementor\Controls_Manager::SWITCHER, 205 214 ) 206 215 ); -
formscrm/tags/4.0.5/includes/formscrm-library/class-gravityforms.php
r3378252 r3389416 169 169 */ 170 170 public function plugin_settings_fields() { 171 $fields = array(); 172 $fields = $this->get_crm_fields( true, array(), 'settings' ); 173 174 // Expert Mode. 175 $fields = array_merge( 176 $fields, 177 array( 178 array( 179 'label' => __( 'Mode', 'formscrm' ), 180 'type' => 'checkbox', 181 'name' => 'fc_crm_mode_expert', 182 'tooltip' => __( 'Enable this option to show all fields of the CRM.', 'formscrm' ), 183 'choices' => array( 184 array( 185 'label' => __( 'Enable Expert Mode', 'formscrm' ), 186 'name' => 'fc_crm_mode_expert', 187 ), 188 ), 189 ), 190 ), 191 ); 192 171 193 return array( 172 194 array( 173 195 'title' => __( 'CRM Account Information', 'formscrm' ), 174 196 'description' => __( 'Use this connector with CRM software. Use Gravity Forms to collect customer information and automatically add them to your CRM Leads.', 'formscrm' ), 175 'fields' => $ this->get_crm_fields( true, array(), 'settings'),197 'fields' => $fields, 176 198 ), 177 199 ); 178 200 } 179 201 202 /** 203 * Settings API Key 204 * 205 * @param array $field Field. 206 * @param bool $echo Echo. 207 * @return string 208 */ 180 209 public function settings_api_key( $field, $echo = true ) { 181 210 182 211 $field['type'] = 'text'; 183 184 212 $api_key_field = $this->settings_text( $field, false ); 185 213 186 // switch type="text" to type="password" so the key is not visible187 $api_key_field = str_replace( 'type="text"', 'type="password"', $api_key_field);214 // Switch type="text" to type="password" so the key is not visible. 215 $api_key_field = str_replace( 'type="text"', 'type="password"', $api_key_field ); 188 216 189 217 $caption = '<small>' . sprintf( esc_html__( 'Find a Password or API key depending of CRM.', 'formscrm' ) ) . '</small>'; -
formscrm/tags/4.0.5/includes/formscrm-library/class-wpforms.php
r3290078 r3389416 600 600 ); 601 601 602 printf( 603 '<input type="checkbox" name="fc_crm_mode_expert" class="fc_crm_mode_expert" value="on" /><label for="fc_crm_mode_expert">%s</label>', 604 esc_html__( 'Enable Expert Mode', 'formscrm' ) 605 ); 606 602 607 $js_dependency = ''; 603 608 foreach ( formscrm_get_choices() as $crm ) { -
formscrm/tags/4.0.5/readme.txt
r3378252 r3389416 5 5 Requires at least: 5.5 6 6 Tested up to: 6.8 7 Stable tag: 4.0. 48 Version: 4.0. 47 Stable tag: 4.0.5 8 Version: 4.0.5 9 9 License: GPL2 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 49 49 - [WHMCS](https://close.technology/en/wordpress-plugins/formscrm-whmcs/) 50 50 51 You can use multiple feed connector in GravityForms, WPForms PRO and ContactForm7, and you can use multiple CRM connectors in the same form.51 You can use multiple feed connector in GravityForms, WPForms PRO, Elementor Forms and ContactForm7, and you can use multiple CRM connectors in the same form. 52 52 53 53 Demo: … … 59 59 {label:N} in order to get the label from field N (only in GravityForms) 60 60 61 **Expert Mode** 62 You can enable Expert Mode in the form feed. This mode will show all fields of the CRM in the form mapping. This is useful if you want to connect all fields of the CRM to the form. Now currently works for Odoo. 63 61 64 We recommend to use this in the field mapping in the feed and hidden field that gets the value. 62 65 … … 86 89 87 90 == Changelog == 91 = 4.0.5 = 92 * Fixed: CF7 custom fields with select fields not sending. 93 * Added: Expert Mode. 94 * Fixed: Fatal errors in CF7. 88 95 89 96 = 4.0.4 = -
formscrm/trunk/formscrm.php
r3378252 r3389416 2 2 /** 3 3 * Plugin Name: FormsCRM 4 * Plugin URI :https://close.technology/wordpress-plugins/formscrm/4 * Plugin URI : https://close.technology/wordpress-plugins/formscrm/ 5 5 * Description: Connects Forms with CRM, ERP and Email Marketing. 6 * Version: 4.0.47 * Author: CloseTechnology8 * Author URI: https://close.technology6 * Version: 4.0.5 7 * Author: CloseTechnology 8 * Author URI: https://close.technology 9 9 * Text Domain: formscrm 10 10 * Domain Path: /languages 11 * License: GPL-2.0+11 * License: GPL-2.0+ 12 12 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 13 13 * … … 24 24 defined( 'ABSPATH' ) || die( 'No script kiddies please!' ); 25 25 26 define( 'FORMSCRM_VERSION', '4.0. 4' );26 define( 'FORMSCRM_VERSION', '4.0.5' ); 27 27 define( 'FORMSCRM_PLUGIN', __FILE__ ); 28 28 define( 'FORMSCRM_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
formscrm/trunk/includes/formscrm-library/class-contactform7.php
r3290078 r3389416 177 177 </select> 178 178 </p> 179 179 <p> 180 <label for="wpcf7-crm-fc_crm_mode_expert"><?php esc_html_e( 'Expert Mode', 'formscrm' ); ?></label><br /> 181 <input type="checkbox" id="wpcf7-crm-fc_crm_mode_expert" name="wpcf7-crm[fc_crm_mode_expert]" class="medium" value="on" <?php checked( $cf7_crm['fc_crm_mode_expert'], 'on' ); ?> /><?php esc_html_e( 'Enable this option to show all fields of the CRM.', 'formscrm' ); ?> 182 </p> 180 183 <?php } ?> 181 184 </div> … … 288 291 // Create contact in CRM. 289 292 $this->include_library( $crm_type ); 293 if ( empty( $this->crmlib ) ) { 294 return; 295 } 290 296 $merge_vars = $this->get_merge_vars( $cf7_crm, $submission->get_posted_data() ); 291 297 $response_result = $this->crmlib->create_entry( $cf7_crm, $merge_vars ); … … 306 312 * @return array 307 313 */ 308 private function get_merge_vars( $cf7_crm, $submitted_data ) { 314 public function get_merge_vars( $cf7_crm, $submitted_data ) { 315 if ( empty( $cf7_crm ) || ! is_array( $cf7_crm ) ) { 316 return array(); 317 } 309 318 $merge_vars = array(); 310 319 foreach ( $cf7_crm as $key => $value ) { 311 if ( false !== strpos( $key, 'fc_crm_field' ) ) { 312 $crm_key = str_replace( 'fc_crm_field-', '', $key ); 313 314 if ( ! empty( $submitted_data[ $value ] ) ) { 315 $value = $submitted_data[ $value ]; 316 } 317 318 $merge_vars[] = array( 319 'name' => $crm_key, 320 'value' => $value, 321 ); 322 } 320 if ( false === strpos( $key, 'fc_crm_field' ) ) { 321 continue; 322 } 323 $crm_key = str_replace( 'fc_crm_field-', '', $key ); 324 325 if ( ! empty( $submitted_data[ $value ] ) ) { 326 $value = $submitted_data[ $value ]; 327 } 328 329 if ( is_array( $value ) ) { 330 $value = implode( ',', $value ); 331 } 332 333 $merge_vars[] = array( 334 'name' => $crm_key, 335 'value' => $value, 336 ); 323 337 } 324 338 -
formscrm/trunk/includes/formscrm-library/class-elementor.php
r3310866 r3389416 203 203 'fc_crm_type' => formscrm_get_dependency_odoodb(), 204 204 ), 205 ) 206 ); 207 208 // Expert Mode. 209 $widget->add_control( 210 'fc_crm_mode_expert', 211 array( 212 'label' => __( 'Expert Mode', 'formscrm' ), 213 'type' => \Elementor\Controls_Manager::SWITCHER, 205 214 ) 206 215 ); -
formscrm/trunk/includes/formscrm-library/class-gravityforms.php
r3378252 r3389416 169 169 */ 170 170 public function plugin_settings_fields() { 171 $fields = array(); 172 $fields = $this->get_crm_fields( true, array(), 'settings' ); 173 174 // Expert Mode. 175 $fields = array_merge( 176 $fields, 177 array( 178 array( 179 'label' => __( 'Mode', 'formscrm' ), 180 'type' => 'checkbox', 181 'name' => 'fc_crm_mode_expert', 182 'tooltip' => __( 'Enable this option to show all fields of the CRM.', 'formscrm' ), 183 'choices' => array( 184 array( 185 'label' => __( 'Enable Expert Mode', 'formscrm' ), 186 'name' => 'fc_crm_mode_expert', 187 ), 188 ), 189 ), 190 ), 191 ); 192 171 193 return array( 172 194 array( 173 195 'title' => __( 'CRM Account Information', 'formscrm' ), 174 196 'description' => __( 'Use this connector with CRM software. Use Gravity Forms to collect customer information and automatically add them to your CRM Leads.', 'formscrm' ), 175 'fields' => $ this->get_crm_fields( true, array(), 'settings'),197 'fields' => $fields, 176 198 ), 177 199 ); 178 200 } 179 201 202 /** 203 * Settings API Key 204 * 205 * @param array $field Field. 206 * @param bool $echo Echo. 207 * @return string 208 */ 180 209 public function settings_api_key( $field, $echo = true ) { 181 210 182 211 $field['type'] = 'text'; 183 184 212 $api_key_field = $this->settings_text( $field, false ); 185 213 186 // switch type="text" to type="password" so the key is not visible187 $api_key_field = str_replace( 'type="text"', 'type="password"', $api_key_field);214 // Switch type="text" to type="password" so the key is not visible. 215 $api_key_field = str_replace( 'type="text"', 'type="password"', $api_key_field ); 188 216 189 217 $caption = '<small>' . sprintf( esc_html__( 'Find a Password or API key depending of CRM.', 'formscrm' ) ) . '</small>'; -
formscrm/trunk/includes/formscrm-library/class-wpforms.php
r3290078 r3389416 600 600 ); 601 601 602 printf( 603 '<input type="checkbox" name="fc_crm_mode_expert" class="fc_crm_mode_expert" value="on" /><label for="fc_crm_mode_expert">%s</label>', 604 esc_html__( 'Enable Expert Mode', 'formscrm' ) 605 ); 606 602 607 $js_dependency = ''; 603 608 foreach ( formscrm_get_choices() as $crm ) { -
formscrm/trunk/readme.txt
r3378252 r3389416 5 5 Requires at least: 5.5 6 6 Tested up to: 6.8 7 Stable tag: 4.0. 48 Version: 4.0. 47 Stable tag: 4.0.5 8 Version: 4.0.5 9 9 License: GPL2 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 49 49 - [WHMCS](https://close.technology/en/wordpress-plugins/formscrm-whmcs/) 50 50 51 You can use multiple feed connector in GravityForms, WPForms PRO and ContactForm7, and you can use multiple CRM connectors in the same form.51 You can use multiple feed connector in GravityForms, WPForms PRO, Elementor Forms and ContactForm7, and you can use multiple CRM connectors in the same form. 52 52 53 53 Demo: … … 59 59 {label:N} in order to get the label from field N (only in GravityForms) 60 60 61 **Expert Mode** 62 You can enable Expert Mode in the form feed. This mode will show all fields of the CRM in the form mapping. This is useful if you want to connect all fields of the CRM to the form. Now currently works for Odoo. 63 61 64 We recommend to use this in the field mapping in the feed and hidden field that gets the value. 62 65 … … 86 89 87 90 == Changelog == 91 = 4.0.5 = 92 * Fixed: CF7 custom fields with select fields not sending. 93 * Added: Expert Mode. 94 * Fixed: Fatal errors in CF7. 88 95 89 96 = 4.0.4 =
Note: See TracChangeset
for help on using the changeset viewer.