Hi there,
I want to show an ‘update_message’ and change the ‘return’ value for an acf_form()
so that it sends the user to the same page, but with a custom parameter.
In other words, if a user submits the acf_form()
in question:
- URL Before Form Submit: ~/my-url/
- URL After Form Submit: ~/my-url/?my_param=true
I have this working via the code below:
<?php
$options = array(
'post_id' => 'new_post',
'post_title' => false,
'new_post' => array(
'post_type' => 'my-cpt',
'post_status' => 'my_status',
),
'field_groups' => array(
1234
),
'submit_value' => $submit_value,
'updated_message' => $updated_text,
'uploader' => 'wp',
'return' => '?my_param=true&updated=true'
//'return' => '?my_param=true' // Without the &updated=true param above, the 'updated message' doesn't show
);
acf_form($options);
My Question: If I want to send the user to the same page on which they submit an acf_form()
, must I always include the updated=true
URL parameter to show the ‘updated_message
‘ or can this message also be triggered to show via other parameters?
Thanks in advance!