• Resolved maufo

    (@maufo)


    I have a hidden field with info to send to mailerlite, in addition to user email.

    In the last version (7.6.6), this field doesn’t send. In version 7.6.5 run perfect.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hi @maufo

    Hope you are doing fine!

    I have tested if the hidden fields are submitted in version 7.6.6 and they are showing on the network data as you can see in the image below:

    https://snipboard.io/C4FDYJ.jpg

    Could you share additional info about the integration settings and also check if there are any logs that may provide more information about any errors? This information will help us deliver a more precise support for this request.

    Kind regards

    Luis

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @maufo,

    Since we haven’t heard from you for a while. I’ll mark this thread as resolved for now. Please feel free to re-open the thread if you need further assistance.

    Best Regards
    Nithin

    Thread Starter maufo

    (@maufo)

    Hello, I have done new test and errors persist.

    In version 7.6.5: email=a385a8cddc%40emailboxa.online&origen_lead=indefinido&hustle_module_id=1&post_id=4497&hustle_sub_type=shortcode&gdpr=on

    In last version: email=a2c1aa31c9%40emailboxa.online&origen_lead=indefinido&hustle_module_id=2&post_id=14547&hustle_sub_type=shortcode&gdpr=on

    In version 7.6.5, mailerlite receive the value of origen_lead.

    In 7.6.6 version and later, this value is not receive.

    In the log appear this line: session_start(): Cannot start session when headers already sent in /home/excelpar/opocademy/wp-content/plugins/wordpress-popup/popover.php on line 342

    Thread Starter maufo

    (@maufo)

    What file is responsible to send the values to mailerlite? I can take a look, I’m a developer.

    Thanks in advance.

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @maufo,

    I tested the popup in my system and it works out of the box when tested with Mailerlite.

    Could you please make sure the “Name” of the Hidden field added is as follows:
    https://imgur.com/roxg8eH

    Could you also check whether you notice any error listed under Hustle > Email List for the existing submissions?

    In general, the files responsible for the API would be located under /wordpress-popup/inc/providers/mailerlite

    Please do let know if you are looking for anything specific on how the data is sent.

    Best Regards,

    Nithin

    Thread Starter maufo

    (@maufo)

    Hello, my hidden field is configured like this:

    https://imgur.com/a/glULq6a (run correctly in 7.6.5 version)

    The value of origen_lead is not received in mailerlite

    ?Is there other way to do it in new versions?

    “Could you also check whether you notice any error listed under Hustle > Email List for the existing submissions?” No submissions in this section (Local List is Inactive)

    Thank you

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @maufo

    I hope you’re well today!

    I got a feeling that we (on our end) may be missing a point here so let me ask additional question:

    How the hidden field is filled-in? I mean, it’s set to a custom name and custom value – so where this value of the field is coming from? Are you using some custom code for that – to put the value in it?

    If yes, that would be most likely why the issue is happening as – due to security concerns and requirements – those hidden fields are additional sanitized (similarly to our Forminator plugin too) and they can’t take values “just like that”; they can only accept and carry over values that are set in field configuration.

    So if you are indeed using some custom code to fill that field in, the simplest solution would be to do as follows:

    1. replace the “hidden” field in popup with regular “text” field
    2. hide that field with CSS
    3. and adjust custom code (usually that’s matter of changing field ID/name in it, depends on the code) to put value into that new text field.

    Text fields can accept any value (well, except e.g. HTML or scripts) so that should be carried over.

    Kind regards,
    Adam

    Thread Starter maufo

    (@maufo)

    Hello, with a text filed run correctly.

    Now, I would need a filter how “hustle_field_hidden_field_value” to get the value of this field.

    I think it doesn’t exist in Hustle. Any alternative?

    Thanks.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @maufo

    I kind of assumed you were setting the value of that hidden field earlier most likely using some JS on front-end but I understand that you have been using “hustle_field_hidden_field_value” filter in PHP script for that then.

    If so, then to set the value of your text field, you can use a different filter with a little “trick”, like this:

    add_filter( 'hustle_form_submit_field_data', 'wpmu_custom_hustle_form_elements', 10, 2 );
    function wpmu_custom_hustle_form_elements( $form_data, $module_id ) { 
    
    	$new_data = array();
    	foreach ( $form_data as $key=>$value ) {
    		if ( $value['name'] == 'origen_lead' ) {
    			$value['value'] = 'your_custom_value_here';
    		}
    		$new_data[$key]=$value;
    		
    	}
    	
    	error_log( print_r( $new_data, true ) );
    	
    	return $new_data;
    	
    }

    The two important lines here are:

    if ( $value['name'] == 'origen_lead' ) {

    where “origen_lead” should be the same as the “name” of your field to be set (name, not label)

    and

    $value['value'] = 'your_custom_value_here';

    where instead of your_custom_value_here string you set your own value (either as a fixed string or as return of some custom function of yours).

    Best regards,
    Adam

    Thread Starter maufo

    (@maufo)

    Thank you so much for the code. You’ve been very kind.

    Finally, I have solved with code JavaScript session and run perfect.

    Issue solved!

    Hi @maufo,

    Thanks for the update and glad to hear the issue is solved.

    Would you let us know if we can mark the Topic as solved too? Thanks.

    Best regards,
    Laura

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Hidden Field don’t send in last version’ is closed to new replies.