Tagged: frontend forms
- This topic has 4 replies, 2 voices, and was last updated 5 years, 11 months ago by
jrcreative.
-
AuthorPosts
-
-
March 7, 2016 at 8:23 pm #6037
jrcreativeMemberWhat’s the best way to go about creating a multi-page frontend form in piklist?
A few options come to mind, but what I’m attempting now is to create a page for each form, add the shortcode to each page, and use javascript redirection on save_post. I have the name of the next page in a hidden field so javascript knows where to take you.
The challenge I have now is that Piklist wants to show the confirmation message at the top of the form. Is it possible that there’s another Piklist hook that I can grab onto after form validation and submission (saving to DB), but before displaying the message?
Right now, I have to click submit twice to get it to go to the next page. The first brings up the message, and the second click actually takes me to the next page.
-
March 7, 2016 at 8:34 pm #6038
jrcreativeMemberwell… I guess I should have read this forum more thoroughly… There’s a redirect option in the header comment block that does the trick.
-
March 8, 2016 at 2:48 pm #6042
jrcreativeMemberSo, the next challenge is to have the first form create a post, and the subsequent pages update that post. Any ideas would be much appreciated.
-
March 10, 2016 at 11:12 am #6052
SteveKeymasterTo edit the form after submission, pass the ID of the object. Here we can edit Post ID 145:
http://mydomain.com/my_form/?_post[ID]=84Does that help?
-
March 10, 2016 at 7:20 pm #6059
jrcreativeMemberYes, I found that in the documentation and it works perfectly!
I wrote a script that looks to see if they have a post in draft, and if so, append the query string with the post id so they could continue adding to that post. It runs for each page in the sequence (a 5 page application) and allows them to go back and forth in the process and make updates as needed until they pay, at which point the post status is updated and they can’t make further changes.
-
-
AuthorPosts
- The topic ‘Multi-page frontend form?’ is closed to new replies.