Im using a UI-template-node to create a few textfields and a button to store the user-input from the text field in my flow variables. By clicking on the button all values in the textfield are set to "". Now since I didnt want to include the whole logic of the tab into one template I seperated the check for valid input in an extra function-node. When the user input is wrong I'm sending a msg to the ui-template node (topic="check", payload="false").
Is there a way to update the value of the textfields to the flow-variables whenever a msg with topic="check" and payload="false" arrives? That way the user can correct the textfields that have wrong input and wont have to fill in all textfields again.
Heres the code im using for one of the textfields and the button
<md-input-container>
<label>Number</label>
<input type="number"
id="order"
ng-model="user.order"
placeholder="10-digits"
ng-change="msg.payload = user.order; msg.topic = 'order'; send(msg)"
style="color: black;"
onKeyPress="if(this.value.length==10) return false;">
</md-input-container>
<md-button
onclick=" document.getElementById('order').value = '';"
ng-click="msg.payload = 'true'; msg.topic = 'check'; send(msg)"
style="
background-color: #72b904;
font-size: 15px;
line-height: 50px;">
send
</md-button>