Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
It's great that RocketCake allows you to create/add forms to pages, but what do I do for actual form processing scripts? Can RocketCake generate them or do I have to do this manually? Thanks if anyone can help. |
||||
|
For how to do this with a contact form, you can take a look here, at the contact form tutorial: https://www.ambiera.com/rocketca... |
||||
|
OK, thank you. This helped a lot, but one slight problem is that the form tutorial is saying that a contact page has to be created (with a .php extension). What if I want to add a form to an existing page that doesn't have a .php extension, such as the home page (index.html)? Mini update - just re-saved a .html file with a .php extension (as per tutorial instructions...) but it is still a .html file and not a .php file. How do I actually save a .html file as a .php file?? I've also discovered that you can't actually use/test the form on your local machine; the page with the form first has to be uploaded to a server supporting php, so the tutorial is a bit misleading. Sorry, just being honest! |
||||
|
You can rename the index file in the property window and make it an .php instead of a .html file. |
||||
|
Also: If you really need a .html file instead, you can also alternatively have the action of the form go to another file (like contactsubmit.php) and put the php code on there. |
||||
|
wrote: You can rename the index file in the property window and make it an .php instead of a .html file. Sorry to contradict, but this simply results in a .html file, only with an arbitrary .php extension. This is not an actual .php file. If I look at the code view, it simply shows html markup from top to bottom; there are no opening and closing php clauses. |
||||
|
That's how php works. You include the the PHP then using the PHP code element just like in the tutorial. |
||||
|
Ah, I see! So I rename the html file as a php file in the properties box (already done) and then add the php code to it (as per tutorial...) and that then results in a valid php file? Thank you. One other little thing... For the form action, do I specify the name of the php file that the php code is in (in my case index.php), or do I give some other file name (php)? |
||||
|
Yes, that's how it works. About the form action: Yes, you specify the name of the file where the data is then sent to, and where the PHP code is on, right. |
||||
|
OK, thanks for clearing me up on that. I get it now . |
|