Making Field Read Only based on condition

Comments

6 comments

  • Avatar
    Sridhar Mullapudi

    Hi Pranav,

    This depends upon what field do you want as read only. Currently, GoCanvas has static text and static image fields. These fields can be used supported by a logic based on the value of the other field. So those fields will be read only and appear only if you meet a certain response from other field.

    Hope this helps

    0
    Comment actions Permalink
  • Avatar
    Pranav Kumar

    @Shridhar Mullapadi Thanks for the info. However this does not solve my issue. The use case is as below:

     

    I have 2 Text fields lets say Text1 and Text2. I want to make field Text2 editable or read only based on the value of Text1 field while dispatching the app. for example, when Text1 is "New" the field Text2 is blank and user should be able to enter the data. However when the Text1 is "Old" the value in Text2 might already be present and we do not want the user to change the data in the field but only to inform of the value present.

    Hope it clarifies when I am coming from.

    0
    Comment actions Permalink
  • Avatar
    Sridhar Mullapudi

    @Pranav Kumar: If thats the case, You can do this way.

    Add a static text(what ever it is) field named TEXT 2 like i said before and condition it to appear if Text 1 is not equal to NEW and add one more text field with the same name TEXT 2 and condition it to appear if TEXT 1 is equal to NEW. 

    This way, the default read only response will appear if you choose/write anything other than new. A text field will appear for user to write if he chooses/writes NEW.

    Thsi logic works in both cases if 1st field is text field or drop down field or multiple options field.

    Hope it helps

    0
    Comment actions Permalink
  • Avatar
    Pranav Kumar

    Yes that's how I am doing at the moment however it does not look very good when you look at the structure of the form and you have multiple field holding the same info with one being read only and other being editable.

    So i hope someday goCanvas can include this in their upgrades.

    0
    Comment actions Permalink
  • Avatar
    Sridhar Mullapudi

    Pranav, i dont understand. Both wont come up. Only one of the two fields will come be visible while filling the form. So the user wouldn't even know that there are two duplicated fields and its the same case with output report as well if you opt to put them in a same cell.

    Only you (template designer) can see how it is built. Any normal user will not see anything to not being good.

    0
    Comment actions Permalink
  • Avatar
    Pranav Kumar

    Yes. I am talking in terms of template designer's perspective. I am getting the desired result by having 2 fields.

    0
    Comment actions Permalink

Please sign in to leave a comment.