Hello everyone,
I'm a newbie to SAS and more specifically to GRC.
I'd like to know if is there any way of configuring text limit (e.g. nr of characters) for input fields of text or textarea (in CPB modules).
For our case, GRC generates a HTML like the following:
<input type="text" id="X_EVENT_TRO" name="X_EVENT_TRO"
value="0"
size="75"
onchange="cpb.setPageDirty()"/>
I would like it to generate also maxlength attribute and/or validate input size through javascript (for textareas in browsers where maxlength is not yet supported).
Thank You.
Hi,
yes, you can use the max-length attribute.
max-length - (optional) The maximum length of the input content allowed in the text input.
Example:
<field name="your_string" type="string" max-length="15">
<label>Max chars = 15</label>
</field>
Cheers and good luck,
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.