I need to collect two different credit cards. Their inputs are placed within a single form.
When I select a credit card from the Google Pay suggestions to autofill, all fields are autocompleted with this card data.
screenshot
I tried different ids, names but it doesn't help. I could only create two different forms to fix it. Is there any way to have those inputs in a single form?
<form name="ccform" action="">
<input id="cc-number1" name="cc-number1" autocomplete="cc-number" />
<input id="csv1" name="csv1" autocomplete="cc-csc" />
<input id="exp1" name="exp1" autocomplete="cc-exp" />
<input id="cc-number2" name="cc-number2" autocomplete="cc-number" />
<input id="csv2" name="csv2" autocomplete="cc-csc" />
<input id="exp2" name="exp2" autocomplete="cc-exp" />
</form>
Related
In the web page that I am working on I have to setup a page that allows the user to choose two files and compare them. They are given three choices. One of these choices uses a text box for user input. When I try implementing this I found that the text box was not connected to the intended option. It could be accessed from the other options. I would like help fixing my text box so that it is exclusively connected to the third object "substrings".
<form action="/compare" enctype="multipart/form-data" method="post">
<button> Choose File 1</button><br>
<button>Choose File 2</button><br>
<input type="radio" name="compare" value="lines"> lines<br>
<input type="radio" name="compare" value="sentences"> sentences<br>
<input type="radio" name="compare" value="substrings"> substrings
<input type="number" min="1" placeholder="length of substring n"/><br>
<button type="submit">Compare</button>
</form>
I am working on a registration form that requires home and work addresses upon submitting.
The fields are as follows:
<html>
<form>
<input name="street-address" autocomplete="home street-address" required />
<input name="postal-code" autocomplete="home postal-code" required />
<input name="locality" autocomplete="home locality" required /> <!-- or "home city" -->
<input name="organization" autocomplete="organization" required />
<!-- addressee or department withing the organization. optional field -->
<input name="addressee" autocomplete="????????" />
<input name="work-street-address" autocomplete="work street-address" required />
<input name="work-postal-code" autocomplete="work postal-code" required />
<input name="work-locality" autocomplete="work locality" required />
</form>
</html>
I am using http://microformats.org/wiki/hcard and https://html.spec.whatwg.org/multipage/forms.html#attr-fe-autocomplete-organization-title to create a nice browser compatible autofill form.
What I can't figure out is if there is a nice autofill name for the addressee / department field.
Is anyone familiar with this / or any input?
I assume you want to use full street-address. if you just want to use address line 1 then try address-line1.
See MDN Specification here
Also Google Developers page (Note: in this example you could see locality, ... but they are deprecated. use )
I currently have a form that looks like this:
<form action="http://blahblahblah.com/c2dm_send.ashx"; method="post" name="push">
<input type="hidden" name="publisherid" value="blahblah" />
<input type="hidden" name="username" value="YOURUSERNAME" />
<input type="hidden" name="pass" value="YOURPASS" />
<input type="hidden" name="appid" value="YOUROTHERINFO" />
<input type="hidden" name="topics" value="topic_name" />
<input type="hidden" name="topics" value="" />
<p align="center">Notification Message:<br />
<textarea style="width:200px;height:100px;" name="pushmessage"></textarea><br />
<input type="submit" value="Push" />
</p>
</form>
Is it possible to have that same textarea apply in a second form? I would like it if I could have an end product where the user types their message into 1 textarea and hits 1 send button but the contents of the text area are sent to two different URLs and with different "hidden" hard-coded Username and Password information for each form it is sent to.
It looks like you're using ASP.NET. You could always store the information in a session variable and use it on any page you like. Here is the documentation on session variables: http://msdn.microsoft.com/en-us/library/ms178581%28v=vs.140%29.aspx
Not in a direct way. You could make a hidden text-area in the second form, and before submiting the second form, copy the value of the visible text-area in the first form into the invisible text-area in the second form.
In that way, it looks as if the second form uses the text-area form the first form!
I did this before. If you need any help with code, you can ask :)
Normally we have a static form that is posted on the server and since it's static we know the name of the variables.
But let's say I have a dynamic number of form elements that I need to post, what's the best way to handle it in the backend? Can it be done via jersey?
A best example of this, is paypal's implementation when checking out items. They have dynamic number of inputs that is suffixed with _x, where x is a number.
<form>
<input type="text" name="name_1" />
<input type="text" name="amount_1" />
<input type="text" name="quantity_1" />
<input type="text" name="name_2" />
<input type="text" name="amount_2" />
<input type="text" name="quantity_2" />
</form>
How do I read all the input text in the backend?
Thanks,
czetsuya
you can read entity as MultivaluedMap<String, String> form or Form form (which is basically same thing) and iterate all keys or .. whatever you need. See FormParamTest for example.
I have a search form i made for a wordpress site.....visually it is good but still not functional.....please let me know what im missing here.
<body>
<form id="start" action="/">
<h1>Search our site</h1>
<p>
<label for="name">Entry</label>
<input type="text" id="name" size="35" />
</p>
<p> </p>
</p-->
<p>
<label>
<input type="checkbox" name="posts" id="posts" />
posts</label>
<label>
<input type="checkbox" name="pages" id="pages" />
pages</label>
<a class="submit" href="#">Submit</a></p>
</form>
<p id="credits"> </p>
</body>
You need to provide a way to submit the form.
<a class="submit" href="#" onclick="document.getElementById('start').submit()">Submit</a>
Based on the comments, we now know what you are trying to do. Your original question was not very specific.
In addition to the missing submit button, you also need to make sure you pass the correct variables in your form to the Wordpress search function. In your example:
<label for="name">Entry</label>
<input type="text" id="name" size="35" />
This code will handle the user input for the search term, I assume. The second line, the input element, needs a name like so:
<label for="name">Entry</label>
<input type="text" id="name" size="35" name="s" />
When this is submitted you will see the s=foo in the URL and that will tell Wordpress that it is doing a search.
I found this out by looking at the source code for a default wordpress search form. I'm not sure what the variables are needed for the other aspects of the form, "posts" and "pages", but you can examine a standard wordpress search form (maybe advanced search?) and then name your form elements appropriately.
Good luck!