Title: Redirect with parameters
Last modified: February 5, 2019

---

# Redirect with parameters

 *  Resolved [graham6117](https://wordpress.org/support/users/graham6117/)
 * (@graham6117)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/redirect-with-parameters/)
 * Hi,
 * I am trying to pass a parameter from an update form to a thank you page. I want
   to pass the id of the record which is in the querystring (?id=) of the update
   form. I have seen a similar post on here but I could not get it working based
   on that. What am I doing wrong? I have tried the following (among a few others).
 * #1
    {% form entity=”contact” mode=”edit” record=currentrecord hide_form=”true”
   name=”Web Update” parameters={ “id”: params.id } redirect=”/share/?id={{params.
   id}}” %}
 * #2
    {% form entity=”contact” mode=”edit” record=currentrecord hide_form=”true”
   name=”Web Update” parameters={ “id”: params.id } redirect=”/share/?id=” ~ params.
   id %}
 * #3
    {% form entity=”contact” mode=”edit” record=currentrecord hide_form=”true”
   name=”Web Update” parameters={ “id”: params.id } redirect=”{{ ‘/share/?id=’ ~
   params.id }}” %}
 * Thank you for your help!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [wizardist](https://wordpress.org/support/users/wizardist/)
 * (@wizardist)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/redirect-with-parameters/#post-11169998)
 * Hi [@graham6117](https://wordpress.org/support/users/graham6117/)
 * Let me assume that ?id= holds the GUID of the record you are editing with a form.
 * The form tag doesn’t accept a `parameters` argument – so it doesn’t make sense.
   You specify the record you’re eager to edit with the `record` parameter. In your
   code you use `currentrecord` which is good.
 * In terms of Twig syntax, the second example is close to excellent!
 *     ```
       {% set redirectUrl = "/share/?id=" ~ currentrecord.id
       {% form entity="contact" name="Web Update" mode="edit" record=currentrecord redirect=redirectUrl %}
       ```
   
 * HTH
    -  This reply was modified 7 years, 6 months ago by [wizardist](https://wordpress.org/support/users/wizardist/).
 *  Thread Starter [graham6117](https://wordpress.org/support/users/graham6117/)
 * (@graham6117)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/redirect-with-parameters/#post-11170231)
 * That works perfectly, thank you for the help.
 * On a semi-related note, is it possible to include new data in the referral URL?
   So that if someone creates a new record using a form, their firstname (for insatance)
   can be passed as a parameter to the next page?
 *  Plugin Contributor [wizardist](https://wordpress.org/support/users/wizardist/)
 * (@wizardist)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/redirect-with-parameters/#post-11170257)
 * [@graham6117](https://wordpress.org/support/users/graham6117/)
 * That would require custom code to be written. `wordpresscrm_twig_form_submit_success`
   action in `src/Form/Model.php` has two arguments, the submitted form with the
   new data, and the CRM record with new data too.
 * You can `add_action()` it and make a redirection by yourself.
 * Thanks
 *  Thread Starter [graham6117](https://wordpress.org/support/users/graham6117/)
 * (@graham6117)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/redirect-with-parameters/#post-11170293)
 * Great, thank you for your help today!
 *  [pritysingh27](https://wordpress.org/support/users/pritysingh27/)
 * (@pritysingh27)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/redirect-with-parameters/#post-11196767)
 * Hi this is my code
    [msdyncrm_form entity=”lead” name=”NewContactForm” mode=”
   create” captcha=”true” redirect=”[https://www.solzit.com/thank-you-4/&#8221](https://www.solzit.com/thank-you-4/&#8221);
   hide_form=”true”]
 * How to use redirect thank you page. I can’t understand.
    Please clearify me ..

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Redirect with parameters’ is closed to new replies.

 * ![](https://ps.w.org/integration-dynamics/assets/icon-256x256.png?rev=1589904)
 * [Dynamics 365 Integration](https://wordpress.org/plugins/integration-dynamics/)
 * [Support Threads](https://wordpress.org/support/plugin/integration-dynamics/)
 * [Active Topics](https://wordpress.org/support/plugin/integration-dynamics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/integration-dynamics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/integration-dynamics/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [pritysingh27](https://wordpress.org/support/users/pritysingh27/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/redirect-with-parameters/#post-11196767)
 * Status: resolved