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
6 replies
Subscribers
8 subscribers
Views
2942 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hi, I am able to set focus to a particular textbox onload of a form u
senthilar
over 11 years ago
Hi,
I am able to set focus to a particular textbox onload of a form using the below code :
document.getElementById("textControl_fd_component_"+window.FormDesigner.runtimeNamespace+"requestComments").focus();
But this doesn't work for textarea. The page throws an error at run-time. Is it because of "textControl_fd_component"? What do I replace that with?...
OriginalPostID-99124
OriginalPostID-99124
Discussion posts and replies are publicly visible
Parents
0
senthilar
over 11 years ago
Eduardo, this code worked fine for plain forms where there are not much fields. But I faced the following behaviors:
1) In a form having lots of controls (around 30) - the code didn't bring the focus to the intended textarea.
2) In a form which is assigned to a group - when a person picks up the task, the following error message is shown in an alert
"An exception was thrown by the custom event "load" with rule "{var settingfocus = document.getElementsByName(\\"plainTextControl_\\"+\\"requestComments\\");settingfocus[0].focus()}"."
Could it be because before the person accepts the task (by hitting the Accept button on top of the page), the form is readonly and so the element is not available for focus?
Any workarounds available?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
senthilar
over 11 years ago
Eduardo, this code worked fine for plain forms where there are not much fields. But I faced the following behaviors:
1) In a form having lots of controls (around 30) - the code didn't bring the focus to the intended textarea.
2) In a form which is assigned to a group - when a person picks up the task, the following error message is shown in an alert
"An exception was thrown by the custom event "load" with rule "{var settingfocus = document.getElementsByName(\\"plainTextControl_\\"+\\"requestComments\\");settingfocus[0].focus()}"."
Could it be because before the person accepts the task (by hitting the Accept button on top of the page), the form is readonly and so the element is not available for focus?
Any workarounds available?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data