Simple Web Form - Submit Button Next...

User 2523812 Photo


Guest
7 posts

Hi - Looking to buy form builder.

My first task is to build a very simple form like below also attached a screenshot

[enter email form box] [submit button]

It seems impossible for me to get the submit button lined up next to the email box - am I doing something wrong or is it just not possible with cc form builder?

Many thanks in advance
Attachments:
User 187934 Photo


Senior Advisor
20,271 posts

Is the image what you want to achieve?:)
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 2523812 Photo


Guest
7 posts

Pretty much - it's going to go below a blurb about why people should sign up for my newsletter.
User 271657 Photo


Ambassador
3,816 posts

I was just looking into this, I wish CC would come up with a few templates for stuff like this (subscribe, request catalogue, article..., account log-in...). Things that usually go on one line and don't take up a lot of space (so, no big headers/footers needed).
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams)
https://www.callendales.com
User 187934 Photo


Senior Advisor
20,271 posts

You'll need to alter the css and or the form html to get it to appear that way. The submit button can be tweaked in the app but it's always stuck in that bottom footer div.
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 2147626 Photo


Ambassador
2,958 posts

Or you could use this simple code...

<form action="process.php" method="post">
<input type="text" name="email">
<input type="submit" value="Submit my email">
</form>

put that in as HTML where you want the box to be.

Then create a file called 'process.php' that contains this code...

<?
$log_file = "emails.txt";
$email = $_POST[email];
$fp = fopen("$log_file", "a");
fputs($fp, "$email\n");
flock($fp, 3);
fclose($fp);
?>

Upload 'process.php' to the same directory where your email request is going to be.

This is a do-nothing script that will simply save emails to a text file on your server. It will not check for duplicates although you can add additional features to the script.

Hope this helps.
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 2147626 Photo


Ambassador
2,958 posts

Sorry, left something out of the 'process.php' code. At the end you need a redirect to reload/refresh your page. Add this line at the end of your code and simply change the URL to your page...

header( 'location:http://gunsmoke.me/formtest3/index.html' );

Here is a test site made is CC VSD: http://gunsmoke.me/formtest3/index.html
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 271657 Photo


Ambassador
3,816 posts

Thanks Gunsmoke! :)
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams)
https://www.callendales.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.