Most voted "form" questions
HTML forms are used to pass data to the server. An HTML Form can contain input elements such as text fields, checkboxes, radio-Buttons, Submit buttons and more. A form can also contain select lists, textarea, fieldset, Legend and label elements (labels).
Learn more…725 questions
Sort by count of
-
49
votes7
answers21565
viewsWhy is the use of frames and iframes considered bad practice?
Well, I started developing WEB a short time ago, say 1 year. and here in the company we use a lot frames and iframes... I know that in the HTML5 view frames are obsolete, but I still see a lot of…
-
22
votes5
answers7447
viewsHow to prevent spam in contact forms without using CAPTCHA?
I am looking for a simple and efficient solution to avoid spam in contact forms. The idea is that the customer does not need to inform that he is a "person" (example CAPTCHA), the form presented…
-
15
votes2
answers5421
viewsHow to validate each data type received from a form?
This subject has several related topics, and generates as many back and forth, each with a different answer. In some cases we have great answers, but no specific question about this question (in the…
-
14
votes5
answers16269
viewsHow to enable a button only when all inputs are completed?
I have a <button> which is rendered as disabled(disabled) when page is initially loaded. I’d like him to stay enabled(authorised) when all data are completed in <input>'s. How could I do…
-
11
votes2
answers1010
viewsHow can I simulate a placeholder using a label?
I’m trying to get the label simulate a fixed placeholder. The biggest difficulty is changing the properties of label when the input receives the focus, and the input fill in the rest of the space…
-
10
votes3
answers19566
viewsCustomize the browser message for a "required" field
With the attribute required (English), for example in a field of the text, the browser will present a balloon to the user to realize that this field is required and must be filled. The problem…
-
10
votes1
answer338
viewsWhat is the purpose of the "Image" input?
Only now have I realized these days that there is one input with the attribute type equal to "image". I saw this being used on some site (very old by the way) to submit a form. I have the following…
-
9
votes0
answers898
viewsComment form does not appear in theme
I am creating a new theme for Wordpress and can not make appear the file comments form comments.php. The other related elements (already saved comments, amount of comments, etc.) usually appear, but…
-
9
votes2
answers1749
viewsPOST method does not take FORM value
I’m making a contact form on a website, but the PHP method does not take the value of input in the form, I’ve searched the internet and I can’t find anyone with the same problem. And e-mail is being…
-
9
votes2
answers12801
viewsSerialize with pure Javascript
Using jQuery I can use the method .serialize() to return in string form all the form items with their respective values, for example, the form below, will return me:…
-
8
votes4
answers2145
viewsWhat technique do I use to keep a form field completed or selected after $_POST[]?
I am developing a real estate system and would like to ask how I can keep the data of a form such as inputs, selects and checkbox selected after giving a $_POST on the form. I don’t know how to…
-
8
votes5
answers26812
viewsWhen is isset required?
I would like to know when it really is essential to use the isset variables in PHP, especially in the case of forms. What happens is that I am creating a large form, with some 200+ fields, which…
-
7
votes1
answer135
viewsHow to insert style into a Zend_form_element_select element?
How can I insert a style in one element option using Zend_form? I’m using Zend Framework 1.
-
7
votes2
answers142
viewsHow does the file receive the $_POST?
Good morning guys, I have to do a maintenance on an old form and I’m trying to understand how it works... Below the form_proposta.php file <? $msg = "Mais informações de imóvel enviado em " .…
-
7
votes1
answer85
viewsMechanisms for form validation
What are the pros and cons of validating forms with these features: HTML5? Javascript? Jquery? HTML5 + Javascript/Jquery? There is something to consider beyond these items?…
-
7
votes1
answer2048
viewsSimple form by Django
If I have in mine model a class usuario, a phones and a class manager, who are one to one, so: class Usuario(models.Model): login = models.CharField(max_length=50, unique=True) senha =…
-
7
votes4
answers327
views -
7
votes1
answer247
viewsCss in inputs using Affordance principles
To facilitate the development of responsive forms it is very common to put 100% width on inputs, and control their size through the width of a div as container, this technique helps when…
-
6
votes1
answer162
viewsIs there any risk of submitting form with HTML?
When inserting the text: Em 19 de maio de 2015 16:48, <asdfsadf> escreveu: and send the form I generated the following error: A potentially Dangerous Request.Form value was Detected from the…
-
6
votes1
answer410
viewsError in Javascript form validation
I have a validation error when I press the button input of submit he does not test the function Javascript and goes right to where the action is telling to go. <HTML> <HEAD>…
-
6
votes2
answers75
viewsHow to solve an elseif that needs to be exclusive?
I want to create a page where when a checkbox is marked, a message is printed, but if all checkbox are marked, print another message. <!DOCTYPE html> <html lang="pt-br"> <head>…
-
6
votes3
answers3732
viewsHow to place two Ivs next to each other in Bootstrap
I’m still novice in web development and I’m having a doubt in my form to put the two lines of the form next to each other in responsive Bootstrap, knowing that each input will bring information…
-
5
votes2
answers3379
viewsHow to avoid sending PHP requests in a row?
Well, the situation is that there are some forms on my website. These forms are programmed to trigger emails using the Phpmailer class. What happens is the following, if the page takes a little time…
-
5
votes1
answer118
viewsDistinguish forms within PHP
There is a way to distinguish forms within PHP, since I want every form to be sent to the same function as it will be in charge of passing the $_GET the proper function capable of verifying the…
-
5
votes2
answers1801
viewsAvoid duplicate data by applying use log counter
In a simple form that saves the following data: ID, IP, Date/Time, Name, Email, State/City. When a person fills in the form, this data is recorded in the database. But if the same user fills in the…
-
5
votes1
answer4116
viewsuse excel spreadsheet to fill web form
I have a spreadsheet in Excel, it was generated from a form of a system and then some data were selected. After that I have to put this data in another web form, this form is in another system other…
-
5
votes3
answers13363
viewsHow to validate an input?
I have a form that sends the values entered in input to another page. I want to do a validation between inputs, if a number is larger than another, and if it is not, do not go to the second page and…
-
5
votes2
answers738
viewsCkeditor does not recognize required attribute
I’m using Ckeditor to create pages that may contain forms (in other words, forms can be inserted into the content being edited, because I’m using the full package). I wish I could use the attribute…
-
5
votes2
answers1005
viewsWhen selecting option displays div with
I have a doubt, as I know nothing of PHP, i would like someone to help me how to assemble or implement a Jquery that I found. In my case there are 2 selects, one who would be called Estado and…
-
5
votes1
answer21967
viewsWhat is . in <form action="." method="post">?
I’m starting in Django and making some changes in code already written by someone. I realized that in form instead of the usual "/action page" to which the data will be submitted, such as in this…
-
5
votes2
answers1321
viewsWhat are the differences between "type=button" and "type=Submit" in an input?
I have a simple Javascript code to add a string to a list ul: JS: function init() { var botao = document.getElementById("addButton"); botao.onclick = handleButtonClick; } function…
-
5
votes3
answers17714
viewsDisable Submit button to make no multiple calls to the server
I am trying to disable the button after clicking , so that it does not keep sending the form data several times if the user keeps clicking. my button <input type="submit" class="formButton"…
-
5
votes1
answer3305
viewsHow do I uncheck the previous radio button after selecting another one?
I have five radio button, of these five one is "marked", as I do to unmark the radio button that I clicked after clicking on another? Example: <fieldset>…
-
5
votes1
answer133
viewsdoubts about POST method
I am learning php and would like to take a doubt if my code is vulnerable to sql Injection. In case I’m putting together a form <form method="POST" action="classes/cliente.class.php"…
-
4
votes1
answer1685
viewsUbmit in form with jquery does not work
I have a form and inside this form I have an input file type. <form id="formulario" method="post" action="upload.php"> <input id="imagem" name="imagem" type="file" class="da-custom-file…
-
4
votes2
answers3116
viewsHow do I keep a website page at the same point it was before updating?
I have a page in html and php and put a form at the bottom of the page. When I click on the "send" button the page refreshes and goes up. This way the user has to scroll all the time until arriving…
-
4
votes2
answers5046
viewsHow to validate Google reCaptcha / noCaptcha in PHP?
How to send such POST that Google asks and so make my field validated?
-
4
votes2
answers727
viewsHow to display a hidden CSS select using Javascript
I have a contact form on a decoration site, except I’m looking to perfect it by putting a select only hidden, Example, my request form, Name, E-mail, Telephone Area Code, Event Date and Decoration…
-
4
votes1
answer586
views -
4
votes1
answer151
viewsHeader cannot find past destination
I’m working on a project and function header cannot locate the destination passed to it. I have the following folder structure: On a certain form, I pass a action for: <form method="post"…
-
4
votes2
answers874
viewsConfirm before submitting javascript function
When I submit a form, by onsubmit(checkFormIsCorrect()), call this javascript function that will validate various situations and submit or not the form. In this capacity: function…
-
4
votes2
answers19877
viewsHow to include an action in the HTML5 sign-up button?
I have the following code: <form action="paginas/login.php"> <p id="log">Usuário: </p> <input id="cmpG" type="text" name="usuario"/> <p id="log">Senha: </p>…
-
4
votes2
answers689
viewsAdd inputs in jquery, but without deleting existing ones
I now have the following code in jquery to add inputs according to the existing number in a text box, However, if the form already exists for some field when clicking to add another one, all fields…
-
4
votes2
answers1310
viewstextarea with notebook lines style
I need to make a form for printing that could be typed in the browser or printed for writing. As it can be written on the printed sheet, I need a style in the textarea that draws the lines as if it…
-
4
votes1
answer1855
viewsSubmit form to a php script and open a modal as soon as it is submitted
I have a form that already validates the fields, but I wanted when clicking the send button to send the data to the file recebe.php and already opened a modal that I created. Follow the code on my…
-
4
votes1
answer2009
viewsIs there any way to validate an input in Angularjs without using form?
I have a input which I wish to validate via Angularjs. However, this input is not within a form. So, when trying to access the form validation information, I was unsuccessful: <div…
-
4
votes4
answers14424
viewsValidate form before sending
I have an HTML page with an email submission form. I need to check on the same page if the fields were filled in or not at the moment the user clicks the Submit button. Apparently he is ignoring the…
-
4
votes1
answer878
viewsContact Form does not send a message - UOL Host
The form even picks up the data after clicking on Ubmit, sends the user to a thank you page but the message does not reach the destination, which is my email. HTML: <section id="contato">…
-
4
votes1
answer155
viewsWith CSS is it possible to control which element will activate the Focus-Within of a Form?
Is there any way to determine with CSS only which elemento focused on specific will activate the :focus-within of form? I want only one input specifically activate the class form:focus-within {} of…
-
3
votes1
answer953
viewsHow to avoid overlapping (overlapping) <select> elements in a form on the same page?
I use wordpress as CMS and created a form with the plugin WPCF7 (Contact Form 7). It turns out that some form elements such as select, checkbox and radio button overlap each other in a way that I…