Maxlength of custom text fields
- brainforge
-
Topic Author
- Offline
Less
More
15 years 2 months ago #21185
by brainforge
Maxlength of custom text fields was created 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:
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 2 months ago #21188
by nicolas
Replied by nicolas on topic Re: Maxlength of custom text fields
We'll add an option for that in next release.
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
15 years 2 months ago #21201
by brainforge
Replied by brainforge on topic Re: Maxlength of custom text fields
Great thanks.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 14
- Thank you received: 0
15 years 2 months ago #21221
by warriorfullights
Replied by warriorfullights on topic Re: Maxlength of custom text fields
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.
Please Log in or Create an account to join the conversation.
15 years 2 months ago #21233
by nicolas
Replied by nicolas on topic Re: Maxlength of custom text fields
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.160 seconds