Skip to main content
gabrield295009
February 13, 2025
Solved

How to refresh a disabled text field so the value can be saved?

  • February 13, 2025
  • 16 replies
  • 0 views

Hello, 

I have a text field who's value is linked to a dropdown field. If the dropdown value changes, the text field automatically changes as well. The text field is disabled as the user should not be able to change the value. The problem I have is that the value of this text field should be saved into a rule input but since I do not interact with the text field, the save into parameter does not trigger. I have no buttons on the interface so I could not add an a!save there. The user does not have to interact with any other field if they don't want so I couldn't put the a!save in another field as well. 

Is there a way for the text field to refresh without interacting with it to trigger the save into? 

    Best answer by mikes0011
    The problem is that the textfield save into does not trigger.

    again, this is expected behavior and indicates that you should be doing your save operation elsewhere.

    tried adding the a!save on the dropdown field but it saves the old value of the local variable

    the solution to this should be to properly order your saves on the dropdown.  Instead of doing the query in the local variable definition of local!tipoProduccion, you will need to do this query in the "save" list of the dropdown.

    16 replies

    mikes0011
    Brainy
    February 13, 2025

    No field can "save a value" if the user doesn't interact with it.

    In your case, you want the value to be saved after the action on the dropdown field, and the text field can merely display that saved value.  This is the correct, and only, option.

    gabrield295009
    February 13, 2025

    Thank you Mike, the problem I have is that if I put the a!save in the dropdown field it stores the previous value of the variable because the variable updates its value after the a!save stores it. Is there a way to have that order reverse?

    stefanhelzle0001
    February 13, 2025

    Please share your code.