• Resolved ailaina123456

    (@ailaina123456)


    Hi,

    Thanks for your great plugin!

    For one of the form created, I have added the following fields in the email notification sent to admin:{embed_url}, {refer_url}. This form is included in a pop up created through pop up maker plugin.
    The full url of the page on which the form is getting filled up is …./create-room/?fesid=358
    However in the email notification, I get only the 1st part of the url that is …./create-room

    How can I get the full url with the exact page post id ?

    Thanks & Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @ailaina123456

    See if the workaround listed here on the WPMU Dev forums helps with your issue.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @ailaina123456

    I hope you’re well today!

    This is happening because it’s using actual embed URL/referrer URL (depending on which macro you add) and the “?fesid=358” isn’t that. It’s an URL parameter or, otherwise, a “query var” which is a slightly different thing in this context.

    The “sanitization” solution linked above won’t work here, I’m afraid. I’m not quite sure if it would be easy to override here but I’ve asked our developers to check it and I’m awaiting their feedback.

    Please keep an eye on this ticket and either I or one of my colleagues will update you here again as soon as we got more information.

    Best regards,
    Adam

    Thread Starter ailaina123456

    (@ailaina123456)

    Hi Adam,

    Thanks for your quick answer.
    Looking forward to your feedback.

    Best Regards

    Plugin Support Jair – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @ailaina123456,

    I hope you are doing well today!

    Our SLS team provided the following code snippet that you can use as a mu-plugin.
    You can find more information below on how to use mu-plugins.
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    <?php
    add_filter( 'forminator_prepared_data', 'wpmudev_embed_data_url_fix', 10, 2 );
    function wpmudev_embed_data_url_fix( $prepared_data, $module_object ){
    	if ( $module_object->id != 2910 ) { // Please change form ID here
    		return $prepared_data;
    	}
    
    	if ( ! empty( $prepared_data['_wp_http_referer'] ) ) {
    		$prepared_data['current_url'] = untrailingslashit( site_url() ).$prepared_data['_wp_http_referer'];
    	}
    	
    	return $prepared_data;
    }

    Before testing please change 2910 with their form’s ID.

    After doing the changes when you use {embed_url} macro in the mail notification then it will fetch the query vars too.

    Kind regards,
    Zafer

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @ailaina123456 ,

    We haven’t heard from you for over a week now, so it looks like you don’t need our assistance anymore.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Url embed’ is closed to new replies.