| @@ -1,11 +1,11 @@ | ||
| 1 | 1 | === Smart Grid-Layout Design for Contact Form 7 === |
| 2 | -Contributors: aurovrata, StrangeTech, altworks, Birmania, netzgestaltung | |
| 2 | +Contributors: aurovrata | |
| 3 | 3 | Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EDV4MEJLPT4VY |
| 4 | 4 | Tags: contact form 7 module, form custom styling, contact form 7 extension, responsive forms, multi-step form, form builder, multi-slide slider form, repetitie fields, form custom javascript |
| 5 | 5 | Requires at least: 4.7 |
| 6 | 6 | Requires PHP: 5.6 |
| 7 | -Tested up to: 5.7.0 | |
| 7 | +Tested up to: 5.5.3 | |
| 8 | 8 | Stable tag: trunk |
| 9 | 9 | License: GPLv2 or later |
| 10 | 10 | License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 11 | 11 | |
| @@ -179,10 +179,8 @@ | ||
| 179 | 179 | ` |
| 180 | 180 | |
| 181 | 181 | The `$cf7key` is the unique key associated with your form which you can find in the Information metabox of your form edit page. |
| 182 | 182 | |
| 183 | -**Alternatively you can now use the custom JS editor** built into the form editor, See this [video tutorial](https://www.youtube.com/watch?v=wTdLVtU_mlU&list=PLblJwjs_dFBslCf0mDCrDYGpm5hBY3sWv&index=4&t=205s) for more details. | |
| 184 | - | |
| 185 | 183 | If you wish to [wp_enqueue_script](https://developer.wordpress.org/reference/functions/wp_enqueue_script/) a general JavaScript file for all your forms, you can use the hook `smart_grid_register_scripts`, |
| 186 | 184 | `add_action('smart_grid_register_scripts', 'add_js_to_forms'); |
| 187 | 185 | function add_js_to_forms(){ |
| 188 | 186 | wp_enqueue_script('my-custom-script', '<path to your custom js file>', array(), null, true); |
| @@ -195,10 +193,8 @@ | ||
| 195 | 193 | function add_css_to_forms(){ |
| 196 | 194 | wp_enqueue_style('my-custom-style', '<path to your custom sheet>', array(), null, 'all'); |
| 197 | 195 | }` |
| 198 | 196 | |
| 199 | -**Alternatively you can now use the custom CSS editor** built into the form editor, See this [video tutorial](https://www.youtube.com/watch?v=0DYxRpWc_F0&list=PLblJwjs_dFBsynXEstrV3fCIC7GBmK9HW&index=3&t=1080s) for more details. | |
| 200 | - | |
| 201 | 197 | = 9.Can I have required fields in toggled sections? = |
| 202 | 198 | Yes, as of v1.1 of this plugin, toggled sections input fields are disabled when collapsed/unused, and therefore any fields within these sections are not submitted. So you can design fields to be required when toggled sections are used, and the fields will be validated accordingly too. |
| 203 | 199 | |
| 204 | 200 | Please note that in the back-end, these fields which are listed in the form layout but are not submitted are set eventually set as null in the filtered submitted data. So if you hook a functionality post the form-submission, be aware that you also need to test submitted values for `NULL` as opposed to empty. |
| @@ -268,12 +264,10 @@ | ||
| 268 | 264 | copy the filter helper code (see [screenshot](https://wordpress.org/plugins/cf7-grid-layout/#screenshots) #21) and place it in your *functions.php* file. The code sample assumes the above example fields and sets up a list element for each field, along with a column header. These list elements are then styled to display them as tables in your mail. |
| 269 | 265 | |
| 270 | 266 | = 15. How can I set a maximum number of rows to a table ? = |
| 271 | 267 | |
| 272 | -As of v2.8, this functionality has now been included. You will need to add the `data-max` attribute to your table (div.container.cf7-sg-table) in the text editor and set it to the row limit you want (see [screenshot](https://wordpress.org/plugins/cf7-grid-layout/#screenshots) #22). NOTE: in a lengthy form it is easy to navigate directly to the table or field's text code line using the shortcode navigation buttons provided in the Grid editor, (see [screenshot](https://wordpress.org/plugins/cf7-grid-layout/#screenshots) #19) | |
| 268 | +As of v2.8, this functionality has now been included. You will need to add the `data-max` attribute to your table in the text editor and set it to the row limit you want (see [screenshot](https://wordpress.org/plugins/cf7-grid-layout/#screenshots) #22). NOTE: in a lengthy form it is easy to navigate directly to the table or field's text code line using the shortcode navigation buttons provided in the Grid editor, (see [screenshot](https://wordpress.org/plugins/cf7-grid-layout/#screenshots) #19) | |
| 273 | 269 | |
| 274 | -When the limit of rows is reached, the add button is disabled and a message being displayed besides it. This message can be customised using the CF7 messages for the form (see the message tab in the form form editor), the message is labelled 'Message displayed when max tables rows reached.'. This message applies to all tables in a given form. Should you need to customise the messages for multiple tables, you can use the `data-max-row-msg` attribute on the table element (div.container.cf7-sg-table), with a custom message. | |
| 275 | - | |
| 276 | 270 | = 16. Can I add custom input or other html elements in the form ? = |
| 277 | 271 | |
| 278 | 272 | Yes this is possible. However, keep in mind that the forms are sanitised using [`wp_kses()`](https://codex.wordpress.org/Function_Reference/wp_kses) function, so any html elements which are not included in the set of permitted elements will be stripped out of the form. A filter is included for you add additional html code permitted by the sanitisation function, |
| 279 | 273 | |
| @@ -337,81 +331,11 @@ | ||
| 337 | 331 | 21. (21) The plugin include hooks for further customisation. Handy helper code snippets are provided within form editor in the metabox 'Actions & Filers', with a set of links on which you can click to copy the code snippet and paste it in your *functions.php* file. |
| 338 | 332 | 22. (22) You can set a maximum number of rows a user can add to a table, by adding the `data-max` attribute to your table element. |
| 339 | 333 | 23. (23) You can filter mail tags, hover your mouse over the blue information icon next to each tag and click the link, this will copy the filter code to your clipboard which you can paste into your functions.php file. |
| 340 | 334 | == Changelog == |
| 341 | -= 4.10.0 = | |
| 342 | -* abstraction of dynamic lists to open the possibility for other tag fields. | |
| 343 | -* fix file required PHP fatal error. | |
| 344 | -= 4.9.2 = | |
| 345 | -* fix admin js to ensure form field udpates reflect. | |
| 346 | -* added 'cf7sg_save_post' action for plugins to save form attributes. | |
| 347 | -= 4.9.1 = | |
| 348 | -* admin css style fix. | |
| 349 | -* pass button element in sgAddRow event. | |
| 350 | -= 4.9.0 = | |
| 351 | -* fix css/js codemirror empty line. | |
| 352 | -* change in file schema, CF7 5.4 file validation handling not longer exposes additional file validation/transport. | |
| 353 | -* files now stored in submission data array. | |
| 354 | -* added actino 'cf7sg_valid_form_submission' fired once submission is validated. | |
| 355 | -= 4.8.2 = | |
| 356 | -* fix for new file validation in CF7 5.4. | |
| 357 | -* ajax submission spinner styling update. | |
| 358 | -= 4.8.1 = | |
| 359 | -* enabled other attributes for input elements in html text. | |
| 360 | -* fix HTML/UI form sync. | |
| 361 | -* add 'cf7sg_preserve_cf7_data_schema' filter for plugin owners to preserve CF7 data schema. | |
| 362 | -= 4.8.0 = | |
| 363 | -* fix missing search.png image for minified css. | |
| 364 | -* added custom attribute data-max-row-msg on tables. | |
| 365 | -= 4.7.8 = | |
| 366 | -* fix ie11 js fn. | |
| 367 | -= 4.7.7 = | |
| 368 | -* enable custom classes on collapsible title element. | |
| 369 | -* remove for..of loops for ie11 | |
| 370 | -* fixed 'cf7sg_dynamic_dropdown_default_value' filter for default value label in dynamic seelect fields. | |
| 371 | -= 4.7.6 = | |
| 372 | -* improve cf7sg js object validation. | |
| 373 | -= 4.7.5 = | |
| 374 | -* fix cf7sg js object validation for non-grid forms. | |
| 375 | -* do not flag non-grid forms if not requiring grid js resoures. | |
| 376 | -= 4.7.4 = | |
| 377 | -* fix redirect for non-grid forms. | |
| 378 | -= 4.7.3 = | |
| 379 | -* fix hidden textarea cf7 editor. | |
| 380 | -= 4.7.2 = | |
| 381 | -* fix helper code for mailtag filter. | |
| 382 | -= 4.7.1 = | |
| 383 | -* fix bug preventing toggled sections within accordions. | |
| 384 | -* fix accordion activation/flagging when contains invalid fields. | |
| 385 | -* added dots button to slides. | |
| 386 | -= 4.7.0 = | |
| 387 | -* enable tab select for panels with invalid inputs. | |
| 388 | -* flag tabs with invalid fields. | |
| 389 | -* flag slides with invalid fields. | |
| 390 | -* flag collapsible sections with invalid fields. | |
| 391 | -* fix default dropdown cf7 tag value. | |
| 392 | -* upgrade glider.js to fix slider submit button bug. | |
| 393 | -= 4.6.2 = | |
| 394 | -* fix prefill for hidden fields. | |
| 395 | -* deprecated cf7sg_mailtag_grid_fields hook, replaced with existing cf7sg_mailtag_{$field_name} for tabbed/tabled fields. | |
| 396 | -= 4.6.1 = | |
| 397 | -* fix redirect bug. | |
| 398 | -= 4.6.0 = | |
| 399 | -* fix tabs row controls. | |
| 400 | -* cleanup row removal in js script. | |
| 401 | -* added js functions cf7sgRemoveTab cf7sgCountTabs | |
| 402 | -* clean up tab removal in js script. | |
| 403 | -* added new tutorial. | |
| 404 | -* upgraded CodeMirror to v5.58.3. | |
| 405 | -* improved handling of multi-form on page. | |
| 406 | -* fix textarea tag default value bug. | |
| 407 | -* added page redirect option. | |
| 408 | -* deprecated hooks cf7_smart_grid_form_id / smart_grid_register_custom_script. | |
| 409 | -* added action hook cf7sg_enqueue_custom_script-$form_key. | |
| 410 | 335 | = 4.5.0 = |
| 411 | 336 | * fix row cloning label removal bug. |
| 412 | 337 | * added js fn cf7sgCountRows, cf7sgRemoveRow. |
| 413 | -* added new tutorial. | |
| 414 | 338 | = 4.4.4 = |
| 415 | 339 | * fix codemirror tag match. |
| 416 | 340 | * improve corrupt form code retrieval when js error prevents editor loading. |
| 417 | 341 | = 4.4.3 = |