Submit web form button - Dreamweaver - forms

I am trying to use Dreamweaver CC 2017.5 to update an existing website. I am stuck on a web form button that won't submit the information. There is both a Submit button (which does not work) and a Reset button (which does work). I have looked for a link to send the form to an email, but I haven't found it yet.
Here is the existing code, as extracted from the large form coding:
Comments:
<br>
<textarea rows="8" name="comments" cols="50"></textarea>
<p>
<input id="SUBMIT" name="Submit Form" type="SUBMIT" value="Submit">
<input type="RESET" value="Reset Form" name="RESET">
</td>
Can you help?

Those buttons won't work if you haven't set a form action. Here is a working example to help: https://www.w3schools.com/html/html_forms.asp

Related

how to store the contact us form data in the google forms for my website

I would like to store the contact us form data in my google form. I have created contact us form in my webpage and copied the google form link in my form link. Kindly tell the steps to make the form work
Here the code that I have written
<div class="form-group">
<form action="https://docs.google.com/forms/d/e/1FAIpQLSedlnzPGGIwjq_C3W0KCev-WexWs6SFdf7nk0sWT3v2wP6fA/viewform?usp=sf_link" class="comment-form contact-form" novalidate="novalidate">
<input type="text" class="form-control" placeholder="Name" name="name">
<input type="text" class="form-control" placeholder="Mail Address" name="email">
<textarea name="message" class="form-control" placeholder="Comment"></textarea>
<button type="submit" class="contact-us thm-btn"><span>Post Now</span></button>
</form>
My google form link is placed n the action which is https://docs.google.com/forms/d/e/1FAIpQLSedlnzPGGIwjq_C3W0KCev-WexWs6SF-df7nk0sWT3v2wP6fA/viewform?usp=sf_link
The google form data is accessible via google sheets.
You also have the ability to create a trigger that will do something with the data when the form is posted, more information on this can be found at.
https://developers.google.com/gsuite/add-ons/concepts/editor-triggers

I can't figure out how to add the <form> tag

I have a simple search box where the user is required to click the Submit button to send the address to some PHP/AJAX to query our SQL db. It does this by using the 'main-search' id of the Submit input.
<div class="address-search">
<input type='text' class='main-search-address' id="main-search-address" placeholder="Enter Street Address">in Seattle, WA
<input value="Search" type="submit" class="submit" id='main-search'>
</div>
I'd like to enable the user to be able to submit this form using the 'Enter' key, but when I wrap the inputs in a form tag, it submits, but no results show up. I've tried adding the id='main-search' to the form tag, which seems to get me closer, but instantly submits the form upon clicking in the text input.
Any help?
Thank you.
Try change:
<input value="Search" type="submit" class="submit" id='main-search'>
for:
<button type="submit" class="submit" id='main-search'> Search </button>
If nothing is displayed, you're probably wrong in your AJAX. Remember, AJAX needs a "id destiny".

How do I get this Newletter Form to work?

I'm not sure what to put in for href:\ Should I reference a mailhandler.php or use a mailto: command? Or is there something better?
<h3 class="margin-bot">Newsletter!</h3>
<form id="subscribe-form" name="sibscribe" method="post">
<label><input class="subscribetext" type="text" onFocus="if(this.value =='Enter E-mail:' ) this.value=''" onBlur="if(this.value=='') this.value='Enter E-mail:'" value="Enter E-mail:" name="keyword" /></label>
<a onClick="document.getElementById('subscribe-form').submit()" class="button" href="#">subscribe</a>
</form>
I think it is meant for the site to which you get after pressing the subscribe button. Preferably the page the form was implemented in (for example to return to the index.html).
You can try it by testing it here on jsfiddle (http://jsfiddle.net). Just put an URL in the field where now is the # and after pressing subscribe you will see that you'll be redirected to that page.

reveal div after form submit

On my Wordpress website, I have an input field where the user types their email address and then clicks "Submit" to submit their email to my google spreadsheet (using a google form on Google Drive).
I also have a button that opens a popup when the button is clicked (I'm using the SimpModal plugin for Wordpress).
Is there a way to integrate both functions, so that I will only have 1 button that accomplishes both results? (i.e. When the user fills out their email address and then clicks the submit button, it will submit their email address to the google form, and also open the popup window?)
Here's my code:
<!--This gets rid of the google confirmation page-->
<script type="text/javascript">var submitted=false;</script>
<iframe name="hidden_iframe" id="hidden_iframe" style="display:none; width:0px; height:0px;" onload="if(submitted){window.location='#';}"></iframe>
<form action="https://docs.google.com/forms/d/XXXXX/formResponse" method="POST" id="ss-form" onsubmit="" target="hidden_iframe">
<input type="text" name="entry.2005577686" value="" id="entry_2005577686">
<input type="submit" name="submit" value="Submit" >
<div id="button-to-open-popup"><a href="#">
<img src="/landing-pg-button-black.png" alt="" /></a>
</div>
</form>
Thanks in advance!!!
Really simple! If you don't have jQuery, please import it somewhere in your code:
<script src="http://code.jquery.com/jquery-latest.js"></script>
And then change the onsubmit in the form tag...
<form ... onsubmit="$('#button-to-open-popup').click();return true;" ...>
Tada!

Checking multiple forms for submission on the same page in coldfusion

Hello again stackoverflow...
Once again I have a troublesome problem. I have a page where I am using jQuery tabs to divide up three update forms. (Two really, one is a cfgrid so it doesn't really count.) Basically, when you submit the first form tab it is fine. However, if you submit the last form, it submits and refreshes the page but nothing was updated.
I've determined it has something to do with identifying which form is being submitted.
Note: These forms are being submitted to same page they are on so I am using this method:
<cfif isdefined("form.submit")>
//database stuff etc
</cfif>
I am submitting the forms by doing this at the end:
<input type="submit" name="submit" id="button" value="Save Changes" onclick = "form.submit()" />
After determining it had something to with identifying which form is being submitted, I changed the button to be:
<input type="submit" name="submit" id="button" value="Save Changes" onclick = "document.forms["form3"].submit()" />
I'm not sure if this is the most efficient way to do this...and I'm not sure how to specific that form3 is being submitted in the coldfusion part...I tried:
<cfif isdefined("form3.submit")>
but this doesn't work. It does not follow through the code.
Note: I'm using coldfusion 8. Also, using CFAJAX tags are limited because our ITS department didn't set up coldfusion correctly on the server...and they don't believe me. Thus I'm kind forced to do it in this ...weird way. It only support cfgrid for some weird reason...
ColdFusion (nor any server-side language) does not know what ID your forms might have - it only knows what you submitted via input (and select/textarea/etc) fields, and puts it in the form scope.
To do what you want, you need to have forms somthing along the lines of:
<form>
....
<input type="submit" name="submit1" value="Save Changes"/>
</form>
<form>
....
<input type="submit" name="submit3" value="Save Changes"/>
</form>
Then on the CF side you check which form it is with:
<cfif StructKeyExists(Form,'Submit1')>
...
</cfif>
or
<cfif StructKeyExists(Form,'Submit3')>
...
</cfif>
Hah, I figured it out! You have to make the submit names different on each form.
<input type="submit" name="submitDoc" id="button" value="Save Changes" onclick = "document.forms["form3"].submit()" />
I just changed the submit name to submitDoc
<cfif isdefined("form.submitDoc")>
Works!