Workflow Smart UI Form Not Saving Data Added Programmatically
Hi All,
We are developing workflows for a client and working hard (and creatively) to use OOB Smart UI Forms. We have a form where we launch a webreport for data search and api lookup...then, the user selects a record and we populate the form data in the workflow form. Easy Peezy, right? (no, tkl will not be appropriate in this situation).
Alas, when we submit the form, we realize the data is not saved: 1) get error messages for required fields - even though i see the form data in the proper field. 2) submit again and even the non-required data is not saved when we get to the next step.
It seems, the user has to manually click and tab through each field for the data to be saved. I have tried tabbing through with focus() and blur(), but that does not seem to trigger the data save, either.
I'm a little befuddled and extremely annoyed. :( I am assuming there are some eventListeners applied to the form fields. I am making my way through the workflow form javascript files, but thought someone on this forum might know why this is happening and how i might resolve the issue.
Thanks, in advance!
Donna
Comments
-
some fields, such as userid, can actually have several hidden fields supporting them which also need to be populated so worth checking that out.
Also, if the field has some JS checks, as you mentioned, then it may need to "moved through" to trigger those events
1 -
Hi Greg,
Thanks, very much, for the response. It's definitely a javascript issue -- i have been going through the smart ui forms js files and can't seem to figure out a way to fire off the js events when i populate the fields programmatically (definitely not the hidden user fields, in this case).
I suspect there is a link between the smart ui "alpaca" fields and the real form template fields. Because - even when I update the alpaca fields with updated classes (exactly as they get updated when I tab out of a form field), the final validation fails - i.e., does not recognize the values that i am saving in the alpaca form fields.
It's been completely frustrating and I think, in the interest of completing the project, I am going to have to use a custom form. I really wanted to leverage the out-of-box smart ui forms for this project, but my lack of understanding all of the js has put that goal out of reach. :(
Thanks, again, for the reply!
Best,
Donna
0 -
can you override the offending function with your own copy of it so it validates as expected ?
0 -
I have considered that approach. there is a section in the csui-forms.js that defines the functions for keypress, keyup, etc. I have tried to tap into the onChange -- but, it just doesn't seem to be committing the data I input from my search form.
I also worry about changing anything related to smart ui, as every patch update seems to modify so many of these files - I suspect I would be introducing a maintenance nightmare for the client. Additionally, I don't know how i might adversely affect any of the other workflow forms we have in production. There would be a lot of regression testing before I would feel confident that something won't break.
I know this is just my lack of javascript knowledge and, if time permitted, I would try to bring another developer in to look at it - but, I'm just concerned with being so late on what I thought would be a very simple task. :( Smart UI is so frustrating to work with; it looks like custom forms is going to be the better approach. I'm going to give this a couple more hours today, then call it a lesson in futility. ;-)
Thank you, from the bottom of my heart, Greg, for taking the time to share your good thoughts.
Donna
1
Categories
- All Categories
- 122 Developer Announcements
- 54 Articles
- 151 General Questions
- 148 Thrust Services
- 56 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 7 XM Fax
- Follow Categories