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
jQuery( document ).ready( function() { | |
var runCustomJS = Marionette.Object.extend( { | |
initialize: function() { | |
this.listenTo( Backbone.Radio.channel( 'form' ), 'render:view', this.editFieldData ); | |
}, | |
/* | |
* In this function you can do things like: | |
* modify the form data |
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
jQuery.ajax({ | |
url: nfFrontEnd.adminAjax, | |
type: 'POST', | |
data: data, | |
cache: false, | |
xhrFields: { withCredentials: true }, | |
success: function( data, textStatus, jqXHR ) { | |
try { | |
var response = jQuery.parseJSON( data ); | |
nfRadio.channel( 'forms' ).trigger( 'submit:response', response, textStatus, jqXHR, formModel.get( 'id' ) ); |
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
array(22) { | |
["date_updated"]=> | |
string(10) "2016-06-21" | |
["active"]=> | |
string(1) "1" | |
["type"]=> | |
string(8) "webhooks" | |
["from_name"]=> | |
string(0) "" | |
["from_address"]=> |
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 | |
//Are all these args passed in from Ninja Forms? | |
//Is the data array build by Ninja Forms? | |
// I am having trouble figuring out how to correctly use this process function in my actions.php | |
public function process( $action_settings, $form_id, $data ) | |
{ | |
$list = $action_settings[ 'newsletter_list' ]; | |
$double_opt_in = $action_settings[ 'double_opt_in' ]; | |
$data[ 'actions' ][ 'emma' ][ 'list' ] = $list; |
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 | |
//Does the string 'members/signup' do? I see you do this quite a bit in mailchimp as well | |
//I didn't see | |
$this->response = $this->emma->make_request('members/signup', 'POST', $member_data); | |
//This is the method you are calling inside the Emma library. | |
//I'm just trying to get my head wrapped around this concept. | |
/** |
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
add_action( 'ninja_forms_display_init', 'my_filter_functiontwo', 10 ); | |
function my_filter_functiontwo( $form_id ) | |
{ | |
global $ninja_forms_loading; | |
if ( 66 == $form_id ) { | |
$user_info = get_userdata(1); | |
//Grab the user's first name and update the value of field 1098. | |
$ninja_forms_loading->update_field_value( 1098, $user_info->first_name ); |
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
007070 444A47 CF6706 FFFFFF FF7B00 FFFFFF 00FF04 F6FA0C |
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
//Hook into ninja forms processing. | |
add_action( 'ninja_forms_post_process', 'ninja_forms_code', 9999 ); | |
function ninja_forms_code(){ | |
//Declare $ninja_forms_processing as a global variable. | |
global $ninja_forms_processing; | |
//Get an array of all user-submitted values: | |
$all_fields = $ninja_forms_processing->get_all_fields(); |
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
/*This is the function the line of code is in. It starts on line 258 in the current code base. | |
*The The file path is ../ninja-forms-multi-part/js/dev/ninja-forms-mp-display.js | |
*You will need to re-minify the js and replace the minified js file located in ../ninja-forms-multi-part/js/min/ninja-forms-mp-display.js | |
* After you have made the changes. | |
*/ | |
function ninja_forms_update_progressbar( form_id, current_page ){ | |
var mp_settings = window['ninja_forms_form_' + form_id + '_mp_settings']; | |
var page_count = mp_settings.page_count; | |
if( current_page == 1 ){ | |
var percent = 0; |