[Resolved] Passing parameters and values in CRED form submit
This thread is resolved. Here is a description of the problem and solution.
Problem:
Passing parameters and values in CRED form submit
Solution:
Tooslet Forms offers the hook: cred_success_redirect which you can use to redirection to your desired page where you can pass URL prams as required.
Tell us what you are trying to do?
I have a update form and want to pass a value in the submit to the next page url.com?abd1=post-id&abc2=cpt-field-name
Hello. Thank you for contacting the Toolset support.
Well - Tooslet Forms offers the hook: cred_success_redirect which you can use to redirection to your desired page where you can pass URL prams as required.
For example:
add_filter('cred_success_redirect', 'custom_redirect',10,3);
function custom_redirect($url, $post_id, $form_data){
if ($form_data['id']==9999)
return 'url.com?abd1=post-id&abc2=cpt-field-name';
return $url;
}
Where:
- Replace 9999 with your original form ID.
- Adjust the code as required
Thank you. The problem I am have is adding the values as when contained within the quote marks ' ' that contains the url. how do I insert the fields without breaking the function.
If you can tell me what fields/URL prams you want to pass and to what URL I can try to share the solution.
If it possible fore you to send me access details?
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.