Skip to main content

Maxlength of custom text fields

15 years 3 months ago #21185 by brainforge
In v1.5.2 can specify the size of a custom text field.
However, cannot specify a maxlength to stop user entering more the X characters.

Could the custom fields screen be changed please to include a Max Length parameter and the code in the hikashopText field class changed to something like:
Code:
$size = empty($field->field_options['size']) ? '' : 'size="'.intval($field->field_options['size']).'"'; $size .= empty($field->field_options['maxlength']) ? '' : ' maxlength="'.intval($field->field_options['maxlength']).'"';

Please Log in or Create an account to join the conversation.

15 years 3 months ago #21188 by nicolas
We'll add an option for that in next release.

Please Log in or Create an account to join the conversation.

15 years 3 months ago #21201 by brainforge
Great thanks.

Please Log in or Create an account to join the conversation.

15 years 3 months ago #21221 by warriorfullights
That would be one of the good news I learned so far. It would give a bit of hint to users of the max length they could enter in a certain field. I am excited about this.

image missing http://imagicon.info/cat/5-47/bye.gif

Please Log in or Create an account to join the conversation.

15 years 3 months ago #21233 by nicolas
Note that the maxlength html parameter does not display anything to the user. It just prevents him of inputing more characters.

Please Log in or Create an account to join the conversation.

Time to create page: 0.311 seconds
Powered by Kunena Forum