Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
10 subscribers
Views
7078 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I have a read only text field with value pre-populated. How can I get the displa
shaoyongw
over 9 years ago
I have a read only text field with value pre-populated. How can I get the display value? The saveInto expression is never executed.
a!textField(
label: "label",
value:"testValue",
readonly: true(),
saveInto: ri!tv
)
OriginalPostID-165545
OriginalPostID-165545
Discussion posts and replies are publicly visible
Parents
0
chetany
A Score Level 1
over 9 years ago
As correctly said by @nageswararaoa, the value will not be saved if the user does not interact with the SAIL component. There is another solution. Specify the default value in local variable in load. Then save that variable in rule input in the buttonLayout. So that when the user submits the form by clicking on "Submit" button, the value will get saved into the rule input automatically. In this case, the user need not interact with the text field. Your code will be like this:
load(
local!tv: "testValue",
a!formLayout(
firstColumnContents: {
a!textField(
label: "label",
value: local!tv,
readOnly: true(),
saveInto: local!tv
)
},
buttons: {
a!buttonLayout(
primaryButtons: a!buttonWidgetSubmit(
label: "Submit",
saveInto: a!save(ri!tv, local!tv)
)
)
}
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
chetany
A Score Level 1
over 9 years ago
As correctly said by @nageswararaoa, the value will not be saved if the user does not interact with the SAIL component. There is another solution. Specify the default value in local variable in load. Then save that variable in rule input in the buttonLayout. So that when the user submits the form by clicking on "Submit" button, the value will get saved into the rule input automatically. In this case, the user need not interact with the text field. Your code will be like this:
load(
local!tv: "testValue",
a!formLayout(
firstColumnContents: {
a!textField(
label: "label",
value: local!tv,
readOnly: true(),
saveInto: local!tv
)
},
buttons: {
a!buttonLayout(
primaryButtons: a!buttonWidgetSubmit(
label: "Submit",
saveInto: a!save(ri!tv, local!tv)
)
)
}
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data