Open lexoyo opened 8 years ago
can you give me example for dropdown option?
<div class="input-field col s6">
<select>
<option value="91" selected>India (+91)</option>
<option value="213">Algeria (+213)</option>
<option value="376">Andorra (+376)</option>
<option value="244">Angola (+244)</option>
<option value="1264">Anguilla (+1264)</option>
<option value="1268">Antigua & Barbuda (+1268)</option>
<option value="54">Argentina (+54)</option>
<option value="374">Armenia (+374)</option>
</select>
<label>Country</label>
</div>
this dropdown coding selected value not shown in received email..
did you put this code between the <form action="https://formspree.io/your@email.com" method="POST" target="_top">
and the </form>
?
@singchan yes, I have total 5 question i.e. name, mobile, email etc and also select country using dropdown menu but only dropdown result not shown in submitted form in received mail
oh ok
you probably need to add a name="abcd"
like this:
<div class="input-field col s6">
<select name="country">
<option value="91" selected>India (+91)</option>
<option value="213">Algeria (+213)</option>
@singchan thanks man after submitting here, I also submit this problem to formspree and they teach me as you told.
Can I add "Bcc" mail? In formspree , only shown for "CC"
I think you can if you pay them? You can make a php file to receive the info and send emails with cc and data formated as you want
@singchan : already "cc" is included in free plan thank you for reply
some noted that your site http://lexoyo.me/ is not support for mobile browser
Can I add a captcha (e.g.: Coinhive PoW captcha) before submitting the form?
Is it possible to check if e-mail is an e-mail address? By default one can write any text in the field.
@btcsmartads I don't know about captcha but yes you can validate the form with JavaScript when the field value is changed (by listening to the DOM event)
Formspree is a nice tool to add forms to your Silex website.
Formspree is a commercial service, with a free and a paid plan.
How it works
When you add a form to your website, it looks like this
When a user submits info, Formspree will send you the info by email, it looks like this:
Setting it up is easy and free
You don't even have to register.
Setup the HTML form
Copy this code and paste it in Silex, in an html box (
insert
menu thenHTML Box
, the double click on the HTML Box)Replace the email address (
your@email.com
) with your own email.And add the fields you need in your form, for example you can add a dropdown list with a
<select>
HTML tag or another<input>
HTML tag.Ensure all
<input>
,<select>
and<textarea>
elements inside your form have a name attribute, otherwise you will not receive the data filled in these fields.Submit the form and confirm your email address
Save your website, open the preview (
view
menu, thenpreview
), and submit the form once. This will send you an email asking to confirm your email address.Remember that if you display the same form in multiple URLs of your site you'll have to confirm it multiple times!
All set, receive emails
From now on, when someone submits that form, we'll forward you the data as email.