- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2016 07:50 AM
Does anyone know the character limit on the multi line text catalog variable?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2016 08:06 AM
Hi Rhonda,
For variables there is no limit and allows you to as many lines you like.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2016 02:50 PM
Hey, not sure if this is still an issue, I was having the same issue today and was able to resolve this with the following onLoad catalog client script.
function onLoad() {
//Type appropriate comment here, and begin script below
var i = document.getElementById('element_id'); //variable name
i.maxLength = '1050';
}
you can get the id by right clicking the variable in the form view, and choosing inspect and finding the id='IO ######################' text example below.
<textarea class="question_textarea_input cat_item_option" wrap="soft" id="IO:cfe90c11d57cd200585544e383220bc0" onchange="if (typeof(variableOnChange) == 'function') variableOnChange('IO:cfe90c11d57cd200585544e383220bc0')" name="IO:cfe90c11d57cd200585544e383220bc0" rows="5" maxlength="1050" style="height: 300px; overflow: hidden; word-wrap: break-word; resize: none;"></textarea>
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 03:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2016 12:48 AM
function onLoad() {
try {
//Use the 'onkeyup' event to check the 'isMaxLength' function
//Get the control
var control = g_form.getControl('YourVariable');
//Set its onkeyup method
control.onkeyup = isMaxLength;
} catch(ex) {
alert("Exception1: " + ex);
}
}
function isMaxLength(){
try {
//Max Length 123 Characters
var mLength=123;
var control = g_form.getControl('YourVariable');
//Compare the length
if (control.value.length >= mLength){
g_form.hideErrorBox('YourVariable');
try {
// message shown
g_form.showErrorBox('YourVariable', 'You have reached the maximum character limit for this field.');
} catch(e) {
//showerrorbox or showfieldMsg would trigger an error, that is the reason why we catch the error without doing anything.
}
control.value = control.value.substring(0, mLength);
}
else{
// hide the error when below 123 Characters
g_form.hideErrorBox('u_sms_message');
}
}
catch(ex) {
alert("Exception2: " + ex);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2016 09:32 PM
Hello Luis,
I have to implement the same for the Service Portal..getcontrol method won't work there.Is there any solution for this?
Thanks
saranya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2019 12:38 PM
Did you ever find a solution to this? I need to restrict input on a Service Portal form to a specific number of characters.
Thanks
David