How to insert parameter to url from html form? - html

I have a link class.php?event=donbass2012
and I have a html form. How to send value from form to url to get link like this:
class.php?event=donbass2012&class=f1a

Just use a normal GET form, with whatever inputs you need.
<form action="class.php">
<input type="hidden" name="event" value="donbass2012">
<input type="hidden" name="class" value="f1a">
<input type="submit">
</form>

Is this what you want?
<form name="input" action="class.php" method="get">
<input type="hidden" name="event" value="donbass2012" />
<input type="hidden" name="class" value="f1a" />
<input type="submit" value="Submit" />
</form>

Related

HTML form Accept/Decline buttons

so I have this HTML form with two buttons that say "Accept" and "Decline."
<div class="disclaimerAD top">
<form enctype="application/x-www-form-urlencoded" action="index.html" method="post">
<input type="hidden" name="id" value="5" id="id">
<input type="hidden" name="process" value="1" id="process">
<input type="submit" name="accept" id="accept" value="Accept">
<input type="submit" name="decline" id="decline" value="Decline"></form> </div>
<form enctype="application/x-www-form-urlencoded" action="index.html" method="post">
<input type="hidden" name="id" value="5" id="id">
<input type="hidden" name="process" value="1" id="process">
<input type="submit" name="accept" id="accept" value="Accept">
<input type="submit" name="decline" id="decline" value="Decline"></form>
This isn't my code, I don't know why there's two.
Right now hitting either "Accept" or "Decline" brings the user to "index.html." But I want hitting "Accept" to bring the user to "index.html" and hitting "Decline" to just refresh the page, which is called "5.html". How can I get this to work?
Remove the Decline input field and use a link to 5.html instead. You can get them to look the same with CSS if needed.

HTML Form to email issue. What is wrong with the line of code?

<input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" />
Should I change "saveForm" to "Post"? Then where do I insert email address to send to?
yes you can do this with proper form
<form action="your page where you send the value"> <label>Name:
</label> <input type="text" name="name"> <label>Email:</label> <input
type="email" name="name"> <input type="submit" name="submit"> </form>
I cannot add the html form script here as this block does not allow me to. Can you view source at page at link: http://www.sparesite.co.za/index.html

Why does my button stop working when I change the input type?

So I used PayPal's button creator from their site and it gave me this code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"
target="_top">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="">
<input type="hidden" name="lc" value="CA">
<input type="hidden" name="item_name" value="">
<input type="hidden" name="item_number" value="">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="CAD">
<input type="hidden" name="bn" value="PP-
DonationsBF:btn_donate_LG.gif:NonHostedGuest">
<input type="image"src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit">
<img alt="" border="0"src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
which is fine, and working. But what I want to do is change the button to btn-primary.
So when I edit my input type from image to button, then change the "src" to class and inside my class have "btn btn-primary". The edited line looks like this:
<input type="button" src="btn btn-primary" border="0" name="submit">
I thought the only thing I was changing was the look of the button. Is there a specific way where I can get btn primary to reference PayPal instead of their donate button? Does the btn-primary need an href?
Thank you.
try this:
<input type="submit" class="btn btn-primary" border="0" name="submit">
type submit will submit the form.
Hope this helps.

how to expand the rows of an input field while keeping it part of the form

I know there quite a few people that say to get a multi-line input you need to use a textarea, but I can't because then it wouldn't be part of the form. Here is my code.
<form action="form.php" method="POST">
<input name="field1" type="text" value="type here" />
<input type="submit" name="submit" value="enter">
</form>
You can't. The only HTML form element that's designed to be multi-line is <textarea>
<form action="form.php" method="POST" id="myForm">
Name: <input type="text" name="usrname" />
<input type="submit" name="submit" value="enter">
</form>
<textarea name="comment" form="myForm"></textarea>
The texarea is outside the form, but by adding the ID of the <form> it's still a part of the form.
Is there a reason you can't use:
<form action="form.php" method="post">
<textarea name="field1"></textarea>
<input type="submit" name="submit" value="enter">
</form>

how to submit a hidden form HTML JSP

I want to update a field in my html form separately from the rest. I know we can't have embedded forms in html so how can I make this work?
<form name="LabelForm" method='POST' action="lab/CA/ALL/createLabel.do">
<input type="hidden" name="lab_no" value="<%=lab_no%>">
<input type="hidden" name="aNum" value="<%=aNum%>">
<input type="hidden" name="label" value="<%=label%>">
<td><input type="submit" value="Create" /></td>
</form>
In the above code, the submit button is outside the main table which is part of another form called ackform. I want to put the submit button in the main table(so everything's neat and orderly) but make it part of LabelForm. The value that is entered by the user is "label" which I want to submit with the LabelForm.
Here's my guess:
<form name="TDISLabelForm" method='POST' action="lab/CA/ALL/createLabelTDIS.do">
<input type="hidden" name="lab_no" value="<%=lab_no%>">
<input type="hidden" name="accessionNum" value="<%=accessionNum%>">
<input type="hidden" id="label" name="label" value="<%=label%>">
<td><input type="submit" value="Create" /> <input type="button" onclick="form2.submit()" value="save in the hidden form">
</td>
</form>
<form name="form2" target="fr1" action="....your post code..." method="post">
<input type="hidden" id="label" name="label" value="<%=label%>">
</form>
<iframe style="height:1px;width:1px;border:none:" id="fr1"></iframe>