Forum
Form input type number
I am trying to add the form type 'number' to the Perch forms but it is not working, I just get a blank. If I try it without the perch label it works.
e.g this works
<li>
<label for="Num">Number of people</label>
<input id="Num" type="number" name="Num" value="0"/>
</li>
this does not work
<li>
<perch:label for="Num">Number of people</perch:label>
<perch:label id="Num" type="number" name="Num" value="0"/>
</li>
Perch Runway: 3.1.1, PHP: 7.2.8, MySQL: 10.0.34-MariaDB, with PDO
Server OS: Linux, litespeed
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_blog (5.6.1), perch_forms (1.11), perch_gallery (2.8.9), perch_kraken (1.1), chirp_seo (1.2.1), redfinch_logger (1.0.1), perch_mailchimp (3.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', 'perch_gallery', 'perch_mailchimp', 'chirp_seo', 'redfinch_logger', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/robertsd/public_html/perch
PERCH_CORE: /home/robertsd/public_html/perch/core
PERCH_RESFILEPATH: /home/robertsd/public_html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 50M, Max POST 50M, Memory: 128M, Total max file upload: 50M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: robertsdesign.biz
DOCUMENT_ROOT: /home/robertsd/public_html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
You have perch:label instead of perch:input for the input tag in your example
Your example is:
And it should be:
I actually had that, which does not work, made a mistake in the example above.
Your code in the most recent code you posted works for me in Perch 3.1.1 (not Runway).
Are you using this code in a Content region. Be sure to re-save the region in Admin to update it.
Thanks, Simon, that worked. Should have checked that myself.
On a related matter can you send the details of the form straight to an email address as well as having them displayed as form responses in Perch?
Yes indeed. The 'Form Options' tab will allow you to choose whether to 'Store responses' and/or 'Send response via email'.
Simon, Thanks. Yes, I tried both of those already, neither of them is working, so maybe its a server issue. I set up mailtrap and nothing is coming through, so it might be an issue with the server.
Thanks for your help.
David