FAQ Database Discussion Community


Form “required” attribute in form input field not causing anything to happen

html5,google-apps-script,html-form,required
I'm Andrew from Italy, I'm trying to adapt a script I've found on line. It's a script that creates an HTML form and uploads answers in a spreadsheet. This is the tutorial from wich I've started: GS CODE: var dropBoxId = "XXXXXXXXXXXXXXXX"; // Drive ID of 'dropbox' folder var logSheetId...

Catch form submit not working

jquery,html,ajax,html-form
I've been trying out several samples to catch a submit from a form but all I get is a reload of the page. jQuery(document).ready(function($) { var frm = $('#export-form'); //Catch the submit frm.submit(function(ev) { console.log("Here I am") //Not visible in Firebug // Prevent reload ev.preventDefault(); $.ajax({ type : 'POST', url...

Set date format in HTML form input to YYYY only

html5,date,html-form,html-input
I currently have an HTML form with a date input field. Is it possible to set this to the format YYYY only? I am not interested in the days or months and need the year in this format for some PHP processing. I know I could do some extra work...

How to submit POST request to '“current_url”/submit' in HTML's form action using Django templates?

django,django-templates,django-views,html-form
Let's say I have many posts and each post has a url example.com/post_id. Also there is a HTML form after this post where one can submit comment. If I had to submit this comment to this url: example.com/submit , then I could just do <form action="submit/" method="post">. But, I want...

overriding html form input validation

php,html,validation,html-form
I am a beginner in html/php I wonder why html form input validation (required) not working for input like <myText>.ie input inside < and > No data is received in my php page. How can i solve this problem index.html <form action="genPdf.php" method="POST"> <input type="text" name="text" required="required" ></input> <input type="submit"...

Submit html form without refresh or jquery

php,jquery,html,forms,html-form
I am making a webpage that has a html form in it and some php code to process the form data. What I want to do is make it so it doesnt refresh the page after each button press and save the data to a file? How would I go...

How to fetch user's First Name in php using Gmail Credentials as input?

php,html-form,gmail-imap,imap-open
I earlier used imap_open function in php to validate credentials of users from a form and give them login to my website. Now I also want to print their name that can be fetched from Google Servers providing their credentials as input. I want to Print something like "Hello $gmail->firstname...

maxlength not working in html form input field with bootstrap

html5,forms,twitter-bootstrap,bootstrap,html-form
I am using bootstrap and currently created form with 5 tabs in it. I have a form field called layer time in which I have 3 input fields namely hours, minutes,seconds. I want to set the maxlength of 2 for each field.But it is not working when I specify it....

How would you make a request when you created a form?

javascript,http,post,request,html-form
I am trying to hack a page that requires a "username" and "password". I have created a form and I think it looks good; <form action="http://hackmefff.co/login"> <input type="hidden" name = "username" value="hacker"> <input type="hidden" name = "password" value="b678jk"> </form> People have told me that my form looks good and that...

Readonly elements candidate for constraint validation in HTML5

javascript,html5,validation,html-form
The HTML5 specification states: A submittable element is a candidate for constraint validation except when a condition has barred the element from constraint validation. (For example, an element is barred from constraint validation if it is an object element.) validation steps include: For each element field in controls, in tree...

Where does Google Script PropertiesService store data?

google-apps-script,html-form
Where exactly does the Google Script PropertiesService store user property data? For example, what if I want to clear the user properties without having to run a function with the deleteAllProperties() method? To phrase it yet another way, is there a way to access Google Script properties from the local...

PHP Array from Form then display

php,arrays,html-form
I'm trying to build something that will allow a user to input names into a form text field with commas to separate and when they push submit to then have it put into an array and open a page that lumps those people into groups of x (also selected by...

jQuery / javascript cannot reset a form [duplicate]

javascript,jquery,html-form
This question already has an answer here: How to reset a form using jQuery with .reset() method 11 answers I have been trying to use jQuery to reset the form $('#check_in_form')[0].reset(); Does not work. Using trigger() does not work too $('#check_in_form').trigger("reset"); When I use these 2 methods, I get...

AngularJS: Making a from invalid based upon contents of an input

angularjs,controller,html-form
When validating my form for a password I did previously just have that the password field was required, but now that I am applying conditions to how many characters the password must have ect, and I can't seem to get this part working. I have this function that displays the...

Autocompletion doesn't autocomplete

javascript,autocomplete,local-storage,html-form
Here is a page with: <form action="action.php" method="get" autocomplete="on"> First name:<input type="text" name="fname"><br> E-mail: <input type="email" name="email"><br> <input type="submit"> </form> Let's enter the 2 fields, and submit. Then when reloading the page, the fields are not autocompleted, why? Should I use local-storage? cookies? to be sure that a user that...

Time entry validation in a HTML Form

javascript,html,validation,html-form
I'm trying to add Date validation to a HTML form. I want the date entered to be in the format HH:MM:SS not HH:MM. If I enter date in the wrong format (e.g. HH:MM) then an Alert should show saying: "Date time format should be HH:MM:SS." Please can you help me...

“Not a robot” recaptcha without a
but AJAX instead

javascript,ajax,captcha,recaptcha,html-form
The traditional way of using "I am not a robot" Recpatcha seems to be with a <form> on client-side: <form action="post.php" method="POST"> <div class="g-recaptcha" data-sitekey="6Lc_0f4SAAAAAF9ZA_d7Dxi9qRbPMMNW-tLSvhe6"></div> <button type="submit">Sign in</button> </form> <script src='https://www.google.com/recaptcha/api.js'></script> Then some g-recaptcha-response will be sent to server. However, in my code I don't use a <form> but an...

How to send form data to specific email?

javascript,html-form
I have an html form and I would like to achieve two things with it: 1) - When user clicks on "submit" the data is automatically sent to a specific email and 2) - the user is redirected to a "confirmation page". I do not want to use mailto function...

Error when is blank on a submitted form (Google App Script)

file-upload,google-apps-script,html-form,html-input
I'm creating a Google Web App (which is a HTML form) that will upload a file to a folder on My Drive. It's not required to have a file to upload, so there will be times where this input will essentially be "blank". The app works perfectly fine, except when...

HTML form - Send to email, upon button click

html,html-form,html-form-post
Here I have a fully working form apart from one thing. The email doesn't seem to be sending, I've tried a few different things from various websites but it still doesn't seem to be sending the email upon clicking the submit button. I was wondering if anyone could identify any...

How to display future date and time with a math calculation?

java,javascript,jsp,date,html-form
I'm using Jsp. I would like to display a future date and time according to the current date and time. Explanations. Customer purchases something on the site and on the confirmation page they see the date they ordered. I use <input class="input_ship" style="border:none; background:papayawhip; text-align:center;" name="OrderDate" value="<%= new java.util.Date()%>" readonly>...

Auto Incrementing HTML Form ID's in input field

javascript,auto-increment,html-form
How does one auto-increment Id's to an HTML form so it's easier to classify? Kind of like an invoice/reference number? In other words, is it possible to create an hidden input field that would attribute a serie of numbers and also an ID automatically when the form page is loaded...

How can the action at the form get the value?

php,html,html-form
When I try to use this structure: <form name="confirm" method="get" accept-charset="utf-8" enctype="multipart/form-data" action="confirm_sent.php?name=<?PHP echo $name; ?>"> ...........//sth doing at here <input type="submit" class="popUpButton" name="confirmButton" id="submitPage4" value="Confirm" /> The name was get from the URL: http://localhost/reserve/app/confirm.php?name=$name But, when I click the button confirmButton it will directly to confirm_sent.php but at the...

Store persistent HTML form data in Google Script

google-apps-script,html-form
I wrote a Google Script web app to back up selected Gmail labels to a user-defined Google Drive location. Forml.html presents the data in a tabular format. On each row lives index (which is the checkbox), label and drive target. We would like the data in each row to persist...

Form “action” using javascript

javascript,ajax,html-form
html code : <section class="main"> <form class="form-4" name="form4" id="form4" method="POST"> <p class="submit"> <button type="submit" name="submit" onclick="show()"><i class="icon-thumbs-up icon-large"></i></button> </p> </form> </section> js code : function show(){ $.ajax({ type: "POST", url: "check_login_points.php", data: {test : JSON.stringify(arr)}, success: function(data) { if(data == 0) { alert(" SORRY :( \n misplaced cue points."); }...

Multiple attribute for input tag in html 5 doesnt allow user to upload multiple images in android devices

html,html5,html-form
Input tag with multiple attribute fails to accept multiple images for android devices. I tested it over Android 4.4 for Samsung, HTC, Sony using google chrome and default browser. But it works perfectly fine for iOS devices using Google chrome and default browser. Can somebody tell me what is missing?...