DaveKid
asked on
Post Form to Specific WordPress Page Template
I have a form that a built. I want the action of the form to be a page template called "InitialPlacement_Action". I know that could post the page back to itself but like I said I'd like to be able to post it to that template page.
Any way to do this?
Any way to do this?
ASKER
@Ray
This is really more of a WordPress question. I should have made that more clear but since I was choosing WordPress as my primary section I was posting to, I didn't think it necessary. Will make that update.
This is really more of a WordPress question. I should have made that more clear but since I was choosing WordPress as my primary section I was posting to, I didn't think it necessary. Will make that update.
Why is this WordPress specific? Even in WordPress, a form uses the action attribute to send the data to a specific page.
Your page template is just a PHP file in the theme folder. That's the action:
http://yoursite.com/wp-content/themes/yourtheme/pagetemplate.php
Your page template is just a PHP file in the theme folder. That's the action:
http://yoursite.com/wp-content/themes/yourtheme/pagetemplate.php
ASKER
Sorry, I must have used the wrong "word" to describe my action page. I NEVER use WordPress and am only doing a one off for a friend of mine. I can describe it better like this:
I set up a "new page" in WordPress. I titled that page InitialPlacement_Action. How do I post to that new "page"?
I set up a "new page" in WordPress. I titled that page InitialPlacement_Action. How do I post to that new "page"?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, testing = important.
(although, i have a php plugin installed so I can run custom php)
I'm guessing by your post that it needs to be the fully qualified URL?
(although, i have a php plugin installed so I can run custom php)
I'm guessing by your post that it needs to be the fully qualified URL?
"Needs" is a relative term (at a minimum it "needs" to be something that works). A fully qualified URL is perfectly fine in most cases, and often a good path to a working solution. OTOH it limits the ability to reuse the code.
http://php.net/manual/en/tutorial.forms.php