- This topic has 5 replies, 2 voices, and was last updated 6 years, 6 months ago by
bicho44.
-
AuthorPosts
-
-
July 23, 2015 at 5:36 pm #4058
bicho44MemberHi: I need a ‘price’ field, but i cannot put a number field with the comma separated values.
The ‘Step’ value is not affected.piklist ( 'field', array( 'type' => 'number', 'scope' => 'post_meta', 'field' => 'precio_barco', 'label' => __('Precio', 'imgd'), 'value' => '', 'step' => '0.01', 'attributes' => array( 'class' => 'text' ), 'position' => 'wrap' ) );Any Ideas?
As always, thanks in advance.
Fede
-
July 23, 2015 at 9:58 pm #4059
SteveKeymasterThe
stepparameter belongs within the attributes array. Let us know if that works. -
July 24, 2015 at 10:35 am #4065
bicho44MemberHi: I tried that too (i forgot to put it at the example), but dont work either.
—
Thanks in advance
FedeUpdate
Now is working, sorry for this -
July 24, 2015 at 10:47 am #4066
bicho44MemberUpdate 2: eXtrange behaviour 😀
If you already have a integer number loaded in the field thestepparameter in the definition is ignored and you can only put integers numbers.But if you delete the values, and save the post, and then re-open the post, you can put float numbers
Weird, hu?
—
Regards from Bariloche, Patagonia
Fede -
July 24, 2015 at 2:49 pm #4069
SteveKeymasterThe
numberfields is an HTML5 field, not a Piklist field. Piklist just makes it easy for you to implement. It looks like you need to set theminattribute as well:piklist ( 'field', array( 'type' => 'number', 'scope' => 'post_meta', 'field' => 'precio_barco', 'label' => __('Precio', 'imgd'), 'value' => '', 'attributes' => array( 'class' => 'text', 'step' => '0.01', 'min' => '0.00' ) ) ); -
July 24, 2015 at 9:10 pm #4074
bicho44MemberOk, i gonna do that
We have to put that in the docs 😀
—
Again thanks
Fede
-
-
AuthorPosts
- You must be logged in to reply to this topic.