BookmarkSubscribeRSS Feed
scmoro
Calcite | Level 5

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.

1 REPLY 1
porlpp
SAS Employee

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,

Luís Pereira

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 848 views
  • 0 likes
  • 2 in conversation