How to make Read Only field.

 4 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
JT
New Member Send Private Message
Posts: 4
New Member
I have added two buttons on a form "PO Return" and "non PO Return" here....

function CHECK_OnClick(id, row)
{
 if(id == "check1")
 {
  //Getting data value from check box 0 or 1
  alert ("po return");
//  Disp="R" nm="Submit" value="R" nbr="_111" id="label110" visable="0"
  POForm();
  
 }
 if(id == "check2")
 {
         alert ("nonpo return");
         NonPOForm();
 }
}



The Alerts word fine when clicking the form, however I would like to supress the Requesting Location field on my form which is TEXT11 _f20.     I would also like to make another field read only.... OUT5 _f18

Thanks...
Robert Spurr
Veteran Member Send Private Message
Posts: 130
Veteran Member
Not sure what you mean by suppress the Requesting location field but as for read only, that is easy. Just delete the existing field, add a new text field, assign the data source and finally go into properties and select output only.
JT
New Member Send Private Message
Posts: 4
New Member
Robert,

thanks. But I need that output field to be output only when the check box is selected and then input field with the check box is not selected.

supression is accomplished.. Meaning make the field disappear when the check box is selected....
JT
Terry P
Veteran Member Send Private Message
Posts: 234
Veteran Member
JT - not sure how to "hide" a field, but you can toggle disable/enable a field by using this command.

lawForm.getFormElement("text1").disabled = true

I've never figured out how or where to get all the properties you can set. I've clicked on just about everything I could in Object Viewer with no luck.
John Henley
Send Private Message
Posts: 3355
lawForm.getFormElement("text1").readOnly=true;
Thanks for using the LawsonGuru.com forums!
John