This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create a new object for custom validation of a custom field. | |
| var mySubmitController = Marionette.Object.extend( { | |
| initialize: function() { | |
| this.listenTo( Backbone.Radio.channel( 'forms' ), 'submit:response', this.actionSubmit ); | |
| }, | |
| actionSubmit: function( response ) { | |
| // Do stuff here. | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_nf_display_enqueue_scripts(){ | |
| wp_dequeue_style( 'nf-display' ); | |
| } | |
| add_action( 'nf_display_enqueue_scripts', 'my_nf_display_enqueue_scripts'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'ninja_forms_after_submission', 'my_ninja_forms_after_submission' ); | |
| function my_ninja_forms_after_submission( $form_data ){ | |
| // Do stuff. | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'ninja_forms_run_action_settings', 'my_ninja_forms_run_action_settings', 10, 4 ); | |
| function my_ninja_forms_run_action_settings( $action_settings, $form_id, $action_id, $form_settings ) { | |
| return $action_settings; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'ninja_forms_submission_actions', 'my_ninja_forms_submission_actions', 10, 2 ); | |
| function my_ninja_forms_submission_actions( $actions, $form_data ) { | |
| return $actions; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'ninja_forms_pre_validate_field_settings', 'my_ninja_forms_pre_validate_field_settings' ); | |
| function my_ninja_forms_pre_validate_field_settings( $field_settings ) { | |
| return $field_settings; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'ninja_forms_submit_data', 'my_ninja_forms_submit_data' ); | |
| function my_ninja_forms_submit_data( $form_data ) { | |
| foreach( $form_data[ 'fields' ] as $field ) { // Field settigns, including the field key and value. | |
| if( 'my_key' != $field[ 'key' ] ) continue; // Check the field key to see if this is the field that I need to update. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Get the ID for a Model | |
| $id = $sub->get_id(); | |
| // Get a single value for a Submission by field. | |
| $field_value = $sub->get_field_value( $field_key ); | |
| // Get all values for a Submission | |
| $field_values = $sub->get_field_values(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // apply_filters('ninja_forms_render_default_value', $default_value, $field_type, $feild_settings); | |
| add_filter( 'ninja_forms_render_default_value', 'my_change_nf_default_value', 10, 3 ); | |
| function my_change_nf_default_value( $default_value, $field_type, $field_settings ) { | |
| if( 'textbox' == $field_type ){ | |
| $default_value = 'foo'; | |
| } | |
| return $default_value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # By Mike Jolley, based on work by Barry Kooij ;) | |
| # License: GPL v3 | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. |