FAQ Database Discussion Community


How to remove spaces from input form submit [duplicate]

php,forms,submit
This question already has an answer here: To strip whitespaces inside a variable in PHP 5 answers So I have an input form where the user would enter a username, after submitting, the site would gather information based on the username, however, if there is a space within the...

Javascript - a form that can not be submitted for a minute after submit

javascript,forms,submit
I have to create a form that can not be submitted for a minute after it has been submitted. <form id="myForm" action="<%=response.encodeURL(request.getContextPath() + " /upisKorisnika.html ")%>" method="POST"> <table id='userInput' class="display" border="0" style="font-family: Arial; font-size: 18px;"> <tr> <td> <c:out value="E-mail: " /> </td> <td> <input type="text" id="email" name="email"> </td> </tr> <tr>...

Bootstrap submit button doesn't react

php,twitter-bootstrap,submit
I don't seem to get this code working in Chrome or IE. Whenever the 'Submit' button is clicked on, nothing seems to happen. The script.php file contains a script inserting the e-mail adress in an SQL database. I've been searching in stackoverflow and the rest of the web for three...

Submit only one form from foreach loop

php,foreach,submit,social-networking
I'm having a problem submitting only one of the forms at my site. The forms are being created dynamic through a foreach loop. Every time i'm submitting one form, it submits all of them, so if there is 10 posts then they have a reply form each, and all it...

codeigniter form validation always returns false even when rules met

forms,codeigniter,validation,submit
Problem: even if my form fields meet the rules the codeigniter form validation still returns false (error). example: public function edit(){ $this->load->library('form_validation'); $this->form_validation->set_rules('title', 'title', 'required|xss_clean|trim|is_unique[news.Title]'); $this->form_validation->set_rules('description', 'description', 'required|xss_clean|trim'); $this->form_validation->set_rules('notes', 'notes', 'required|xss_clean|trim'); if ($this->form_validation->run() == FALSE) {...

sending form info to email

php,forms,email,submit
I have a form that sends info to php doc. When testing, I submit and array displays but won't go to email address. <?php require_once("/includes/fbcheader.php"); ?> <div class="comments"> <h3> We Welcome All Comments </h3> <form action="/php/contact-send.php" method="post" id="contact-form" class="form"> <p class="input-block"> <label for="form-name" >Name</label> <input type="text" value name="name" id="form-name" autofocus...

input type=submit not returning anything

php,post,submit,form-submit
Team, could you please help me on this? I am trying to get the values from a form to alter those values on mysql. It is a sell operation that requires a value and this will be put in the database. I have a check box that allows the user...

Show message in div in submit form

javascript,php,forms,submit
I'm trying to show() a div whenever the user submits the form. The whole site is one page. Currently when you submit it, the form is submitted, then .confirmation div shows up for about 1 second and then it goes away, the page refreshes and the div is gone. This...

submitting login information to Servlet

java,tomcat,servlets,submit
once again I'm stuck with my code. I am trying to write a simple login. The Website with the login is generated by a servlet and once the Login information is inserted, it should be send back to it. This works fine, if I execute it directly in Eclipse, but...

Prevent user stops anything when form is submitting

jquery,forms,magento,submit,form-submit
Is there a way that once a form is submitted can't refresh or stop the page? What I did was that when you click ESC does nothing but still is the X in the navigation bar where you can stop the page. So I'm wondering if I can do something...

Meteor / MongoDB: insert integer instead of string on form submit

forms,mongodb,meteor,insert,submit
I'm working through David's tutorial on Meteor at http://meteortips.com/. How do I insert an integer instead of string on form submit? I think the following line needs to clarify that it's an integer, but I'm not sure how. var playerScoreVar = event.target.playerScore.value; Here's my whole code. Template.addPlayerForm.events({ 'submit form': function(event){...

Time stamping form form submits into MySQL

php,sql,forms,submit
I have got everything I need in terms of inputting my data into my data from a form but struggling to get it to timestamp or looking for the best methods. submit form: <form action="actions/newDocAdd.php" method="post"> <input type="text" name="doc_title" id="doc_title" required="required" placeholder="Document Title"/><br /> <input type="text" name="doc_content" id="doc_content" placeholder="Document Content"/><br/>...

How to prevent submit last questionof a form if there is no answer

jquery,forms,validation,submit
I have a form of a survey with questions. First I hide all questions and I show one after another with button Next. I've made validation and it works but only for the last question it is not working. I've provided also Php validation if someone doesn't have JavaScript enabled....

Do you keep your review's position after removing a build from iTunes Connect?

ios,submit,itunesconnect
Once an app has the state "Waiting for review" in iTunes Connect, if you remove the current build later, and upload a new one directly after, will you keep your position in the review queue of Apple or will it be reset? From a previous experience, I submitted a build,...

Submit form on keypress in textarea

javascript,jquery,submit,enter,onkeyup
I've been trying to do something as basic as submitting a textarea on enter (and shift+enter), and it's really making me confused – I've consulted previous topics on here on Stackoverflow in this matter but no previous solution seem to do the trick. Shouldn't $('#form').submit(); do the job? Neither this.form.submit(); or...

Rails 4: Submit button not responsive after its been reloaded by Ajax

ajax,ruby-on-rails-4,submit,reload
I have a partial in my user show page <div id = "AboutMeJS"> <%= render "about_me" %> </div> The _about_me.html.erb partial is: <% unless @user.about.blank? %> <div class = "HeaderRow"> <span class="glyphicon glyphicon-user AboutMe" aria-hidden="true"> </span> <div class = "Header">About <%= about_me_variable %> <% if current_user == @user %> <a...

AngularJS - Datepicker is not working?

angularjs,forms,datepicker,submit
can anybody explain to me why my button Add Trip 1 works when I enter a valid date (YYYY-MM-DD) but if I use my button Add Trip 2 which calls exactly the same function the date value isn't submitted ! Function creates an empty object ? "Startdatum" is empty even...

How do I submit and use text with a button to upload objects?

javascript,text,three.js,submit
I'm trying to load obj files using three.js and webGL. Currently I can load one object by directly changing the code, but I want users to be able to submit their own .obj files. So far, this is the code that I have. I tried using various examples but I...

PHP Submit Form | Input field with echo'd value in it gives undefined index

php,submit
Currently I have the following form: <form id="new_account_form" action="php/new-account.php" method="post"> <span>name</span> </br> <input type="text" name="main_name" required></input> <br><br> <span>email adres</span> </br> <input type="text" name="main_email" required value="<?php echo $email; ?>" disabled></input> <br><br> <span>user</span> </br> <input type="text" name="main_username" required value="<?php...

how to change background image dynamically only when radio button is selected and by pressing submit button [closed]

javascript,button,submit,radio
how to change background image dynamically only when radio button is selected and by pressing submit button link to sample...

(Coldfusion) Prevent submit button from being exported to excel with table data

coldfusion,submit,export-to-excel
I'm working on getting an html table to export to excel using coldfusion. I've got the table to export successfully but I have run into 2 problems. First, the submit button I use to initiate the export is being sent to the excel file with the table data. Is there...

PHP - Retrieve via $_POST the hidden input's value between several others

php,html,get,submit
I have a table that is in a foreach loop, and every iteration the hidden input receives the ID from the database. My table has in each column an input field because I'd like to edit the data from the database right in the table, and to make it happen...

Get content in div to PHP variable

javascript,php,html,submit,contenteditable
I'm using a div with contenteditable="true" as an input field, and now I'm looking for a way to pass the content of the div to a PHP variable in order to be able to save it in a .txt file. I've been looking around for solutions, and the only suggestion...

How to Upload file onclick of button of type=button not type=submit in mvc4 using html begin form

file,asp.net-mvc-4,button,upload,submit
I have to upload a file using a button (of type button, not submit). And I want to show popup when no-file is selected and clicked on upload, it should not go to controller action. Can anyone help please?...

submit a form pressing ENTER

forms,submit
I have a submit form, when I click on the button "log in" it works, $_POST['login'] contains something, but when I press ENTER key it is empty. form <form class="form-vertical login-form" action="conexio.php" method="post"> <h3 class="form-title">Login to your account</h3> <div class="alert alert-error hide"> <button class="close" data-dismiss="alert"></button> <span>Enter any username and password.</span>...

How to open another view after submit in Yii

php,html,yii,submit
I have a search submit button, and I want my application to open another view on click. This is my code: views/supermarkets/index.php: <?php use yii\helpers\Html; use yii\widgets\LinkPager; use app\views\supermarkets\search; ?> <h1>Supermarkets</h1> <ul> <p> Search by Name </p> <Form Name ="form1" Method ="POST" ACTION = "app\views\supermarkets\search.php"> <INPUT TYPE = "Text" VALUE...

get submitted values with PHP DOM

php,dom,submit
I want to get the values that belong to the answers of a test. There could be any number of questions. A question has the HTML: <form method='post' action='calificar.php'> <div class='pruebaAlumno'> <h5>Pregunta 3</h5> <h3>¿Que factores definen la capacidad de una persona?</h3> <input type='checkbox' name='respuestaAlumno[]' value='Voluntad'> Voluntad <br> <input type='checkbox' name='respuestaAlumno[]'...

Watermark to appear on canvas after submit

javascript,html5,canvas,submit,watermark
I have a HTML canvas, you choose a color and a size for the circle and when onclick, the circle appears. Now I want a watermark with the text "Hello" to be seen before you paint the circles and then disappear when you start drawing and the canvas goes back...

Submit button not working in functions PHP

php,html,forms,function,submit
In my index.php file, I have two sets of codes. One set of code relies heavily on php, and functions while the other set of code relies of only html. I'm trying to get the submit button to get the codes to go to the file register.php, but only the...

Php form submit not working. What's wrong with it?

php,html,mysql,forms,submit
I am simply trying to add form data(email, date) to mysql database. Below is my code. It looks fine but for some reason, every time I submit the form, it doesn't do anything. I don't get any error messages. The only change I see after submit is this in the...

Python (Post) submit a form

python,post,submit
I am teaching myself with submitting a form on the web but somehow post is not working. The url is https://courselist.wm.edu/courselist/ and the code so far is: from bs4 import BeautifulSoup import requests import urllib import re url = 'http://courselist.wm.edu/courselist' with requests.Session() as session: response = session.get(url) soup = BeautifulSoup(response.content)...

Define parameters to be used in a web page as an input

javascript,html,function,input,submit
I'm trying to submit two parameters to be used in a javascript function. The code is as follows: <!DOCTYPE html> <html> <head> <script src="proj4js/lib/proj4js/lib/proj4js-compressed.js"></script> </head> <body> <script> function func1 (x,y){ var z=x+y alert(z) } </script> <form > first input:<br> <input type="text" y="Y" value=85> <br> second input:<br> <input type="text" x="X" value=15>...

method=“GET” gives empty $_GET, method=“POST” gives non empty $_GET. Why? (PHP 5.6.6)

php,forms,post,get,submit
test.php: <?php var_dump($_GET); var_dump($_POST); submit_get.php: <form action="test.php?param=some" method="GET"> <input type="submit" value="Submit"> </form> submit_post.php: <form action="test.php?param=some" method="POST"> <input type="submit" value="Submit"> </form> Submitting submit_get.php gives something like this: array (size=0) empty array (size=0) empty Submitting submit_post.php outputs something like this: array (size=1) 'param' => string 'some' (length=4) array (size=0) empty So, I...

submit form not working with confirm box

javascript,submit,getelementbyid
I'm trying to create a scenario where dynamically generated here's my javascript code: function confirmDelete( varForm ) { var r = confirm("Are you sure you wish to delete this entry?"); if (r == true) { document.getElementById("form" + varForm).submit(); } } and here's my php/html code: <form name="form<?php echo $x ....

how to submit only checked checkboxes

java,javascript,jquery,checkbox,submit
I want to add a "submit" button that submits only the checked checkboxes. I don't know how to pass only the checked ones to the server. thanks. The Button: <a:commandButton id="saveAllBtn" value="Submit All" style="width: 60px; cursor:pointer" action="#{urlAction.saveAll()}" reRender="qualificationForm,messages" disabled="#{urls.rowCount==0}" requestDelay="100" onclick=" disableOperations();beforeRedirect();" onfocus="highlightButton(this);" onblur="unhighlightButton(this);" actionListener="#{growlBean.save}">...

html5 checkbox returns “on” value instead of what i set it to

javascript,html5,checkbox,submit
i got an issue with html5 checkboxes, i have to post it's value on a submit button. On every click on the check button, i have an onclick that sets its value to "0" if unchecked or to "1" if checked. The problem is that it works perfectly to uncheck...

Issue with a Form Submission on Return Key

javascript,jquery,forms,zip,submit
I am fumbling for reasons for why I can't get this script to work when a "return" key is pressed. The form works when I try to submit via clicking the "GO" button yet not when the "Return" key is pressed via keyboard. I'm a bit outside my comfort zone...

Change input value when i press Attribute

php,forms,search,onclick,submit
Ok guys already search for it but no results at all, and cant figured it out how to do this, so my problem is: I have this form: <form method="POST" action="search.php" name="form" id="form"> <input type="text" name="search" id="search" placeholder="Introduza a sua Localização"> <input type="submit" name="Submit" value="Pesquisar"> </form> And what i would...

Javascript popup text box on submit

javascript,textbox,submit
I have a form and I know I can use onSubmit to confirm submittion but I want the user to be able to type in a text box that will be passed back to my php script on submit. I've looked around and cant find any examples of a form...

Add functionality to a submit button php

php,button,submit,action
I have several divs which containing images. I want to add below or beside those divs a submit checkbox with two values and perform an action when the user press the submit button. My php code is the following: echo '<div>'; echo '<img src="'. ($image) .'" alt=""/>'; echo '</div>'; echo'<LABEL...

jquery on confirm submit correct form in the table

javascript,jquery,html,forms,submit
Hi I have table which lists all registered users. I two options Suspend/Reactive and Delete. I want to show a confirm message before these buttons are submitted so that the user is warned of what will happen if this is processed. So I decieded to use a plugin called jquery.confirm...

return false;event.preventDefault not work for 1password auto-submit

javascript,forms,submit
My website has only an ajax submit way for login,so when the form submited directly ,it will return a json data and refresh the page.so I want observe the submit event and trun it to the ajax way,but I can not prevent the auto-submit,I tried many ways to prevent the...

Need to collect form data on one page, go to a new php page for validation, then finally submit to another URL

php,forms,submit,exacttarget
I am working with ExactTarget's WebCollect and because of this, I have to submit my form data to their URL. Because it's going to their URL, I can't manipulate the data once the form is submitted. What I want to do so that I have more control is first submit...

Multiple values at $response [closed]

php,html,submit
On my HTML file i have the following: First Name <input type="text" name="username" size=100> Last Name <input type="text" name="lastname" size=100> when i submit this page i have the following at the php file: $_username = $_POST['username']; $_lastname = $_POST['lastname']; $response = $_Client->doHallo($_username); echo $response; How can i add both the...

Submit multiple checkbox together with textbox input value using PHP and MySQL?

php,mysql,arrays,checkbox,submit
I'm making online test/quiz for students and using PHP and MySQL. Currently I have a form, where I can add the questions and answers into the database. However, I have trouble with submitting correct answers into the database by selecting multiple checkboxes. I want to store all correct answers in...

It is possible to submit a hidden input by clicking on ?

java,spring,jsp,spring-mvc,submit
I thinked somthing like this, but I dont want to use a button to submit, I would submit by clicking on spring message. Is this possible somehow? <spring:url value="/admin/messages" var="messagesUrl" htmlEscape="true"/> <form action="${messagesUrl}" method="POST" class="new-message"> <input type="hidden" name="messageFromDashboard" value="true"> <spring:message code="${newMessage}"> <input type="submit" value="submit"></spring:message> </form> ...

Symfony2 Handling Submit in Form Class

php,forms,symfony2,doctrine2,submit
here goes my doubt: So I created the Form Class acording to the documentation: http://symfony.com/doc/current/book/forms.html#creating-form-classes // src/AppBundle/Form/Type/TaskType.php namespace AppBundle\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; class TaskType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('task') ->add('dueDate', null, array('widget' => 'single_text')) ->add('save', 'submit'); }...

HTML Form Submit To PHP Select Not Working [closed]

php,html,forms,select,submit
Yeah so my HTML code is this: <html> <head> <title> Compare Master - The Master at System Comparison! </title> </head> <body> Select a GPU you want to compare: <br> <form action="compare.php" method="GET"> <select name="lelo" id="lelo"> <optgroup label="Radeon HD Series"> <option name="Radeon3470" value="Radeon3470">Radeon HD 3470</option> <option name="Radeon3650" value="Radeon3650">Radeon HD 3650</option> </optgroup>...

What happens when I add multiple inline JavaScript functions to an onclick handler?

javascript,asp.net,forms,submit,synchronous
I simply want to know what happens in this case: <input type="submit" name="a" id="b" value="Login" onclick="functionOne();functionTwo();" id="LoginUser_LoginButton"> Does functionOne() first run and then once it is completed, functionTwo() runs? My actual situation is on a ASP.NET page, I'm trying to append a domain name to the username in a login...

after submit is pressed site refreshes from the beginning

php,submit,isset
I'm new here and in PHP, I was trying to make a "simple" test of my skills but I can't help my self at this point: <?php error_reporting(0); //zweiter Formular test //$anzahl = $_POST['anzahl']; function step1($anzahl){ if($anzahl > 0){ echo '<h3>Schritt 2</h3>'; echo '<p>Alles klar, bitte gib den<b> ' ....

Font awesome icon and text in input submit button?

html,fonts,submit
I have a similar problem like here , i want to place font awesome icon into my submit button and also a text, it looks so: http://prntscr.com/608exx Content of my input submit value is Buy now &nbsp;&#xf07a; The icon is visible because i set on input field font-family: FontAwesome; my...

How do you push ng-repeat value to controller?

javascript,html,angularjs,submit
I want to populate a webpage using ng-repeat and the following array: var array = [{name: Bill, age: 12, number: 1}, {name: Tyrone, age: 11, number: 2}, {name: Sarah, age: 14, number: 3}]; I want to be able to push a button and return to my Angular controller the name...

Rails. Why does my submit button say Create vs. Update depending on

ruby-on-rails,button,text,submit
Be gentle to the newbie...... Ruby version 2.2.2p95, Rails version 4.2.1. I completed the sample blog application. Works great, and I've been expanding on it. But I'm a noob, and clearly missing something fundamental. From the main index, you are presented with a listing of articles, and you have some...

use googles new reCaptcha as button +jquery

jquery,if-statement,submit,recaptcha
got some idea, i wrote som contact-formular and want to use the "sucessfull" response as submit-button. I got that idea to check if this statement becomes true: if (grecaptcha.getResponse() != "") { } I just have no idea how? Is there a way to check this statement every second? Would...

Prevent multi submit PHP

php,forms,submit
I am seeking a way to prevent multi form submit. I have a form, for example chat.php and its POST action on different file, eg submitter.php. I've tried to implement the solution with the unique token using $_SESSION. chat had a unique $_SESSION[token] and submitter had the if $_POST[token]==$_SESSION[token] My...

Error ITMS-90032 in xcode when submitting to App Store

ios,xcode,submit,info.plist
When I want to submit my app to the app store I keep getting this message : Does anyone know where I have to place this file or if I have to rename / delete it somewhere? This is my info.plist file : And this is my directory : ...

click textbox (to enter characters), when submit is clicked

textbox,click,submit,enter
If click the submit button or a-element(<a> Send </a>) then automaticly the input text is clicked. thanks in advance. function send() { var txt = document.getElementById("textbox"); txt.click(); } <input type="text" id="textbox" name="textbox" style="width:90%;"> <a id="send" style="display:none;" onclick="send()" href="">Send</a> ...

(Help) Get results from multiple dropdown with one submit button

php,html,post,drop-down-menu,submit
I make four horizontal dropdown menu. Here is my code : <div class="MenuSearching" id="Searching"> <div class="Menu1" id="Menu1"> <p> Lembaga</p> <form style="margin-top:-20px;margin-left:-2px;"> <select name="DropLembaga" autofocus required id="DropLembaga"> <option value="no" selected="selected">---Choose one---</option> <option value="FlashCom">FlashCom</option> <option value="InterNusa">InterNusa</option> <option...