POST multipart-form-data - Post ID...

User 985572 Photo


Registered User
13 posts

Hi Folks,
Is it possible to set up an action to POST form data to a php script on my server? In NetObjects Fusion I was able to simply configure the submit button to do this. But by default, the coffeecup form builder seems only really designed to send out emails and add data to a database rather than trigger a remote script?
Thanks
Peter
Peter Phelan
The Imaging Company Ltd
http://www.theimagingcompany.com
User 187934 Photo


Senior Advisor
20,181 posts

Hi Peter,
Yes you can write your own myformname.php script to replace the one the form builder uses. I've done this for a bunch of forms.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 985572 Photo


Registered User
13 posts

Hi Eric,
Thanks for the reply; although I thought Coffeecup made a point of emphasising the ease of use of their software for non techies and non coders? I am always getting emails from them telling me how wonderful their products are! :lol:
Seems a pretty basic ommision to not have this as an option when asking what you want the form to do.

I just made the form up in my web design software Serif WebPlus in the end, where you just tick a box to tell the form what to do. I just asked here since it would have been nice to have this form match the style of my contact form, made up in WFB.
Peter



Peter Phelan
The Imaging Company Ltd
http://www.theimagingcompany.com
User 187934 Photo


Senior Advisor
20,181 posts

The CC form builder has many options available for data submission. You asked "Is it possible to set up an action to POST form data to a php script on my server". This implies to me that the script already exist, so you would either have to build the form to match the script or tweak the script to match the form. I guess I need more info on what your actually trying to do with your form and script.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 10077 Photo


Senior Advisor
1,095 posts

Peter Phelan wrote:
I just made the form up in my web design software Serif WebPlus in the end, where you just tick a box to tell the form what to do.

If I'm understanding correctly, the only thing that you want is the ability to add a custom 'action' destination (ex: myprocessor.php instead of coffeeprocessor.php). In Serif WebPlus, you check a box and then type it in. With the current WFB, you export and then change that one line on the form after export. It doesn't seem like a whole lot more work to edit the form after export, but I understand how Serif's version makes it part of the workflow process.

One of the awesome things about Coffeecup is that they listen to their users. Be sure to make the suggestion in the forums at
http://www.coffeecup.com/forums/web-for … m-builder/

I know the developers are tied up with the new RSD program right now, but you may see it added as an enhancement to WFB later.
ASK ME ANYTHING
I provide personalized help for Coffeecup Users including training for Site Designer and Web Form Builder via Zoom.
Email me at support@usconsumernet.org or call 865-687-7698.

Did you know that Web Form Builder can be used for both simple and complicated forms and that it's not limited to the default fonts and buttons? Take a look at a form we developed for WindowTinting.com.
https://forms.windowtinting.com/forms/w … ppingcart/
User 985572 Photo


Registered User
13 posts

Hi Brian,
Yes you are right, all I wanted to make was a simple form to collect name and email address and have the "submit" button send the data to a script. (Yes Eric, the script already exists. It issues unique licence keys to our software purchasers, sends that info out to the submitter in a personalised email, sends a copy to me, adds them to a database and mailing list etc) So the form is really just a simple "front end" to that automated process.

When you make up a form in WebPLus X7 it asks "where should the form data be sent when the form is submitted?" You are then given a number of options to just tick, including "an email address, a script on my hard drive or a remote script" So in my case, as you say, I just enter the url of the remote script into a little box that appears when you choose the remote script option, and tick POST (GET is the other option). Job done.

I can easily change a line of php code, but where would I find the file in question please? My exported code folder contains a file in the root, then a folder containing many other files inside various sub folders. I took a quick look but did not spend time on it, since I knew I could just go and make it up easily in WebPLus; it was only simple name and email fields.

But it would be useful to get my head around this for future reference so that all forms on a site could easily be made to have the consistent style. I am happily using the Coffeecup forms on all my sites for contact, info etc. As an aside, I am a non coder kind of guy, so obviously did not write the script to which I wanted to send the data! :D
Thanks
Peter
Peter Phelan
The Imaging Company Ltd
http://www.theimagingcompany.com
User 187934 Photo


Senior Advisor
20,181 posts

All you have to do is make sure your variables in the form match the ones your script is processing and then on about line 21 of your myformname.html change where the form posts to.
<form class="fb-toplabel fb-100-item-column selected-object" id="docContainer"
action="../myformname.php" enctype="multipart/form-data" method="POST"
novalidate="novalidate" data-form="manual_iframe">
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 985572 Photo


Registered User
13 posts

Hi again Eric,
Thanks and yes that does it. As Brian said it's not much work; I have to strip out the "Check out my CoffeeCup Form" rubbish automatically embedded into the WFB code anyway.
Thanks again,
Peter
Peter Phelan
The Imaging Company Ltd
http://www.theimagingcompany.com
User 187934 Photo


Senior Advisor
20,181 posts

That's the best part of the form builder. You can use all of it or just its great form building power.:cool:
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.