Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > RocketCake
Advice needed on RocketCake forms

ajac73
Registered User
Quote
2020-04-15 08:54:09

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.


erik
Registered User
Quote
2020-04-15 09:51:29

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...


ajac73
Registered User
Quote
2020-04-15 23:53:07

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!


erik
Registered User
Quote
2020-04-16 12:18:10

You can rename the index file in the property window and make it an .php instead of a .html file.


erik
Registered User
Quote
2020-04-16 12:18:53

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.


ajac73
Registered User
Quote
2020-04-16 12:57:57

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.


erik
Registered User
Quote
2020-04-16 13:05:43

That's how php works. You include the the PHP then using the PHP code element just like in the tutorial.


ajac73
Registered User
Quote
2020-04-17 07:20:03

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)?


niko
Moderator
Quote
2020-04-17 13:09:13

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.


ajac73
Registered User
Quote
2020-04-17 21:16:25

OK, thanks for clearing me up on that. I get it now .


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact