I'm trying to get a Formmail form to re-direct back to it's own page. For example, if I'm on the page, http://www.rightfittech.com/paincenter/contact-us.html, I would like the re-direct to go back to http://www.rightfittech.com/paincenter/contact-us.html, which is the same page.
I searched Google like crazy, and no worthwhile results. The forums keep saying to create a hidden input field
BUT THIS IS NOT WORKING!!!
My code below, and note that I didn't modify formmail, except for email addresses!
<form action="http://www.rightfittech.com/paincenter/formmail.php" name="Contact" method="post"
id="form1">
<input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER" >
<input type="hidden" name="redirect" value="http://www.rightfittech.com/paincenter/contact-us.html"/>
<input type="hidden" name="recipients" value="robertmyrick#hotmail.com" >
<input type="hidden" name="mail_options" value="FromAddr=robertmyrick#hotmail.com" >
<input type="hidden" name="subject" value="New Contact" >
<div class="wrapper row-2">
<div class="col-1">
<div class="form">
<label>First Name:</label>
<input type="text" />
</div>
<div class="form">
<label>Last Name:</label>
<input type="text" />
</div>
<div class="form">
<label>E-mail:</label><br/>
<input type="text" />
</div>
<div class="form">
<label>Phone Number:</label>
<input type="text" />
</div>
</div>
<div class="col-2">
<div>
<label>Enter Your Message:</label>
<textarea cols="1" rows="1"></textarea>
</div>
<div class="wrapper">
<div class="alignright" style="float:left">
<em><b>Clear</b></em>
<div style="width:20px; float:left"> </div>
<em><b>Submit</b></em></div>
</div>
</form>
Try setting the value good_url instead of redirect.
Like so:
<input type="hidden" name="good_url"
value="http://www.rightfittech.com/paincenter/contact-us.html"/>
Related
I created an application form with HTML and on that application the user has to upload his resume. I was thinking to create a form within the form to let the user upload his resume such as:
<div class="application-form">
<form class="contact-form" action="application-form.php" method="post">
<div class="application-data">
<label>First Name</label>
<input type="text" name="first">
</div>
<div class="application-data">
<label>Last Name</label>
<input type="text" name="last">
</div>
<div class="application-data">
<label>Email</label>
<input type="email" name="email">
</div>
<div class="application-data">
<label>Phone Number</label>
<input type="phone" name="phone">
</div>
<div class="resume">
<form action="">
<label>Resume</label>
<input type="file" name="resume">
<button type="submit">Submit Resume</button>
</form>
</div>
</form>
</div>
Seems this is not possible in HTML. What is the best alternative? thanks
I don't see the need for the nested form here...just remove it and make the file upload part of the application-form.php handler. Also add the enctype attribute to your <form> to accept files.
<div class="application-form">
<form class="contact-form" action="application-form.php" method="post" enctype="multipart/form-data">
<div class="application-data">
<label>First Name</label>
<input type="text" name="first">
</div>
<div class="application-data">
<label>Last Name</label>
<input type="text" name="last">
</div>
<div class="application-data">
<label>Email</label>
<input type="email" name="email">
</div>
<div class="application-data">
<label>Phone Number</label>
<input type="phone" name="phone">
</div>
<div class="resume">
<label>Resume</label>
<input type="file" name="resume">
<button type="submit">Submit Resume</button>
</div>
</form>
</div>
i Have a one problem want to share with all of you.
I am develop a custom page in WordPress here is the link of the page http://muhammadimran.info/testing/ when i try to click on new document button and try to submit form it give me error. Here is my code for this please tell me how i can give link in WordPress in action
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Modal Header</h4>
</div>
<div class="modal-body">
<form action="home1.php" enctype="multipart/form-data" method="POST">
<div class="form-group">
<label for="name1">Name</label>
<input name="name" class="form-control" type="text" />
</div>
<div class="form-group">
<label for="title">Title</label>
<input name="title" class="form-control" type="text" />
</div>
<div class="form-group">
<label for="Startdate">Start Date</label>
<input id="datepicker" class="form-control" class="datepicker" type="text" name="start" required="" />
</div>
<div class="form-group">
<label for="Enddate">End Date</label>
<input id="datepicker1" class="form-control" class="datepicker" type="text" name="end" required="" />
</div>
<div class="form-group">
<label for="Users">Users</label>
<input type="text" class="form-control" name="users" />
</div>
<div class="form-group">
<label for="Fileupload">File Upload</label>
<input type="file" class="form-control" name="file" class="file" name="file" required="">
</div>
<input type="submit" id="submit" class="btn btn-primary submitbutton" name="submit">
</form>
</div>
</div>
You should follow the beloe steps:
create a Template:
Home1 Template with file name home1.php
create a page and select the recently create template (Home1 Template).
replace the form action
<form action="home1.php" enctype="multipart/form-data" method="POST">
with
<form action="http://siteur/templateur/" enctype="multipart/form-data" method="POST">
in home1.php
print_r($_POST);
I'm trying to submit data to a list in my mail chimp but also allow the user to upload a file.
Here is my code, the first chunk is the mailchimp autogenerated form which is submitted via:
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
and then it's followed by the basic code to submit a file. But at the moment both functions have a submit button. I want only one. Can anyone help?
<body>
<!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup">
<form action="http://test.us7.list-manage.com/subscribe/post?u=d12b70d4bb1e08c1568d5b392&id=bfb41cbf75" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<h2>Subscribe to our test mailing list</h2>
<div class="indicates-required">
<span class="asterisk">*</span> indicates required
</div>
<div class="mc-field-group">
<label for="mce-EMAIL">
Email Address <span class="asterisk">*</span>
</label>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
</div>
<div class="mc-field-group">
<label for="mce-FNAME">First Name </label>
<input type="text" value="" name="FNAME" class="" id="mce-FNAME">
</div>
<div class="mc-field-group">
<label for="mce-LNAME">Last Name </label>
<input type="text" value="" name="LNAME" class="" id="mce-LNAME">
</div>
<div class="mc-field-group input-group">
<strong>Interests </strong>
<ul>
<li><input type="checkbox" value="1" name="group[5597][1]" id="mce-group[5597]-5597-0"><label for="mce-group[5597]-5597-0">Interest 1</label></li>
<li><input type="checkbox" value="2" name="group[5597][2]" id="mce-group[5597]-5597-1"> <label for="mce-group[5597]-5597-1">Interest 2</label></li>
<li><input type="checkbox" value="4" name="group[5597][4]" id="mce-group[5597]-5597-2"><label for="mce-group[5597]-5597-2">Interest 3</label></li>
</ul>
</div>
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div>
</div>
<form action="upload_file.php" method="post" enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
<div class="clear">
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button">
</div>
</form>
</form>
</body>
You could accomplish this by routing the MailChimp information through your upload_file.php file.
MailChimp has a great API that you can use for more than just adding a subscriber to a list. You would specifically want the listSubscribe() function. There are some great examples on that page.
Here's more documentation on MailChimp's API: http://apidocs.mailchimp.com/api/2.0/
So in your HTML, you would want to remove the second submit button and make it one form with action="upload_file.php". The PHP file would upload the file, then use the API to submit the data to MailChimp.
You html should look like this:
<body>
<!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup">
<form action="upload_file.php" method="post" enctype="multipart/form-data">
<h2>Subscribe to our test mailing list</h2>
<div class="indicates-required">
<span class="asterisk">*</span> indicates required
</div>
<div class="mc-field-group">
<label for="mce-EMAIL">
Email Address <span class="asterisk">*</span>
</label>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
</div>
<div class="mc-field-group">
<label for="mce-FNAME">First Name </label>
<input type="text" value="" name="FNAME" class="" id="mce-FNAME">
</div>
<div class="mc-field-group">
<label for="mce-LNAME">Last Name </label>
<input type="text" value="" name="LNAME" class="" id="mce-LNAME">
</div>
<div class="mc-field-group input-group">
<strong>Interests </strong>
<ul>
<li><input type="checkbox" value="1" name="group[5597][1]" id="mce-group[5597]-5597-0"><label for="mce-group[5597]-5597-0">Interest 1</label></li>
<li><input type="checkbox" value="2" name="group[5597][2]" id="mce-group[5597]-5597-1"> <label for="mce-group[5597]-5597-1">Interest 2</label></li>
<li><input type="checkbox" value="4" name="group[5597][4]" id="mce-group[5597]-5597-2"><label for="mce-group[5597]-5597-2">Interest 3</label></li>
</ul>
</div>
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div>
</div>
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<div class="clear">
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button">
</div>
</body>
I'm using the HTML5 input date type. After posting, I see this input empty, and all the other inputs (HTML4 types) are OK.
What could be the reason?
This is my form:
<form action="/SGM/index.php?r=manager/addcoach_post" method="post">
<div class="registerFeildArea2">
<div class="registerTxtP2">Family name</div>
<div class="registerFeild">
<input name="lname" type="text" value="" size="" class="registerFeildValue" />
</div>
</div>
<div class="registerFeildArea">
<div class="registerTxtP2">First name</div>
<div class="registerFeild">
<input name="fname" type="text" value="" size="" class="registerFeildValue" />
</div>
</div>
<div class="registerFeildArea2">
<div class="registerTxtP2">Address</div>
<div class="registerFeild">
<input name="address" type="text" value="" size="" class="registerFeildValue" />
</div>
</div>
<div class="registerFeildArea">
<div class="registerTxtP2">City</div>
<div class="registerFeild">
<input name="city" type="text" value="" size="" class="registerFeildValue" />
</div>
</div>
<div class="registerFeildArea2">
<div class="registerTxtP2">Birthdate</div>
<div class="birthDayFeild">
<input name="bdate" id="meeting" type="date" value="2011-01-13"/>
</div>
</div>
<div class="AddBtn"><input name="Next" type="submit" value="הוסף" class="AddBtnValue" /></div>
</form>
And when I get to the actionAddcoach_post(), all the fields are OK except for the bdate.
What could be the reason?
I'm editing a site using Modx cms.
I'm trying to add a contact form to the contact page. I already have one in the sidebar specified in a template. The code on the contact page form points to the same div tags, but it isn't picking up any of the css.
any ideas why this is happening. Do I need some kind of plugin?
Thanks for all your help
Regards
Judi
<div class="enquiry-form-top">
<h2>Enquiry Form</h2>
</div>
<div class="enquiry-form">
<form class="enquiry" id="enquiry" action="mailer.php" method="post">
<fieldset>
<legend>Enquiry Form</legend>
<div class="form-field">
<label for="Name">Name:</label>
<input type="text" id="Name" name="Name" value="">
</div>
<input type="hidden" name="thankspage" value="thank-you.html">
<input type="hidden" name="subject" value="Enquiry Form">
<div class="form-field">
<label for="Address"> Address:</label>
<input type="text" id="Address" name="Address" value="">
<input type="text" id="Address2" name="Address2" value="">
<input type="text" id="Address3" name="Address3" value="">
</div>
<div class="form-field">
<label for="DOB">DOB:</label>
<input id="DOB" type="text" name="DOB" value="" />
</div>
<div class="form-field">
<label for="Total-Fund-Size">Total Fund Size:</label>
<input id="Total-Fund-Size" type="text" name="Total-Fund-Size" value="" />
</div>
<div class="form-field">
<label for="Number-Of-Funds">Number Of Funds:</label>
<input id="Number-Of-Funds" type="text" name="Number-Of-Funds" value="" />
</div>
<div class="form-field">
<label for="Lump-Sum-Benefit">Has Lump Sum <br/>Benefit Been Taken:</label>
<ul>
<li>Yes <input type="checkbox" name="Lump-Sum-Benefit" id="Lump-Sum-Benefit" value="Yes" /></li>
<li>No <input type="checkbox" name="Lump-Sum-Benefit" id="Lump-Sum-Benefit2" value="No" /></li>
</ul>
</div>
<div class="form-field">
<label for="Telephone-Number">Telephone Number:</label>
<input type="text" id="Telephone-Number" name="Telephone-Number" value="">
</div>
<div class="form-field">
<label for="Best-Time-To-Contact">Best Time To Contact:</label>
<input type="text" id="Best-Time-To-Contact" name="Best-Time-To-Contact" value="">
</div>
<div class="form-field">
<label for="Email">Email:</label>
<input type="text" id="Email" name="Email" value="">
</div>
<div class="form-field">
<img src="CaptchaSecurityImages.php" alt="">
<label for="security_code"> Security Code: </label>
<input type="text" id="security_code" name="security_code">
</div>
<div class="form-buttons">
<input type="image" name="Submit" value="Submit" src="images/annuity/submit_button.gif">
</div>
</fieldset>
</form>
There is no reason I can think of for this to happen, and you don't need any plug-ins.
Once the page is rendered it is of course just HTML and it doesn't matter if it was made in modx or any other system.
Can you investigate the page using Firebug and make sure the Stylesheet is loading?
Maybe the form that is working is enclosed in a div with a class and all the styles are set in the style sheet as follows (ie. Children of the containing div)
.enclosingdiv .form-field
That would explain why your form isn't picking up the styles.
Also you should check out eform (Package, wiki) it's great for simple contact forms.