Forum

Thread tagged as: Problem

input type="number" showing as plain input

Hi,

I have a number type input in one of my templates, but it's showing as a plain text input. This is what I have in my template:

<perch:content id="item_listing_number" default="0" type="number" min="0" size="s" label="Item listing number" suppress="true" divider-before="Item ordering" />

DevTools on the rendered input in Perch admin shows the following output:

<input type="number input-simple" id="perch_10_item_listing_number" name="perch_10_item_listing_number" value="0" min="0" class="number input-simple s">

Removing input-simple from the type attribute restores the expected display.

Here's the Short Diagnostics:


Perch: 3.0.8, PHP: 5.6.21, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO Server OS: WINNT, apache2handler Installed apps: content (3.0.8), assets (3.0.8), categories (3.0.8), perch_forms (1.9.1) App runtimes: <?php $apps_list = array( 'perch_forms', ); PERCH_LOGINPATH: /perch PERCH_PATH: D:\sites\XXXXX\XXXXX\httpdocs\perch PERCH_CORE: D:\sites\XXXXX\XXXXX\httpdocs\perch\core PERCH_RESFILEPATH: D:\sites\XXXXX\XXXXX\httpdocs\perch\resources Image manipulation: GD PHP limits: Max upload 128M, Max POST 128M, Memory: 128M, Total max file upload: 128M F1: dbdffbe11ef8b9d8ae8cf28ab4033939 Resource folder writeable: Yes HTTP_HOST: dev.XXXXX DOCUMENT_ROOT: D:/sites/XXXXX/XXXXX/httpdocs REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

I'm seeing this behaviour on a couple of projects running Perch 3.0.8, but the same code is working as expected on a project running an older version (2.8.34).

Thanks in advance for your help.

Simon Kelly

Simon Kelly 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that looks like a bug.

Hi,

Just to weigh in on this - updated to the newest version of Perch 3, and looks like this bug is still here (the "simple-input" type is messing up number fields).