Tagged: action, frontend form
- This topic has 2 replies, 3 voices, and was last updated 5 years, 4 months ago by
jrcreative.
-
AuthorPosts
-
-
September 29, 2016 at 2:56 am #7400
freezingfireParticipantHi,
I’m trying to perform a custom WordPress action using a frontend form (I don’t want to save any data just perform a custom action after submission) but cannot find anything helpful in the documentation to help me do so. There’s a param called “Action”, but its undocumented : https://piklist.com/learn/doc/forms/.
Is this possible with the current version of Piklist? I’ve tried the following config and added an action called ‘something_todo’ but nothing happens.
<?php
/*
Title: Register
Method: post
Message: Each option has been updated.
Logged in: false
Action: something_todo
*/ -
October 4, 2016 at 9:52 am #7408
tirins007ParticipantCouldn’t you use “wp_insert_post_data” filter that is called before a post is saved and then manipulate the submission however you wanted. you’d then need to specify “Scope: post” in the comment block of your form and the data will be saved to posts table. but if you did not want to save anything just call “return;”. Hope it helps.
-
October 4, 2016 at 4:49 pm #7410
jrcreativeMember@tirins007’s idea would work, but it would create an empty post for each form submission.
I haven’t married the info in the article above with a Piklist front end form, so this is a bit theoretical, but it should get you in the right direction. At some point I’d like to write this specifically into the Piklist docs, but until then this is where I’d start.
-
-
AuthorPosts
- You must be logged in to reply to this topic.