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
10 replies
Subscribers
6 subscribers
Views
3472 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I have used an image in the form which is used to auto submit on the click. docu
raghunandanj3904
Certified Senior Developer
over 12 years ago
I have used an image in the form which is used to auto submit on the click. document.forms[0].submit();
Now in the form, before I click the image, i have certain fields to be entered. I enter them and save them into an ac! param and in data i am mapping them to the pv!.
But when i see in the instance, pv!'s have no values assigned to them.
May i know how to set the values to pv! params??
I think cos i am using script to submit the dorm, the data tab assignments are not happening.
May i know the solution for this?...
OriginalPostID-63995
OriginalPostID-63995
Discussion posts and replies are publicly visible
0
raghunandanj3904
Certified Senior Developer
over 12 years ago
dorm*=form sorry for the typo
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Christine
Appian Employee
over 12 years ago
I am not sure I am understanding completely.... Are you manually entering data into the elements on the form? those elements are using the Save As property into an AC? then the image is clicked and the form is submitted?
If yes, then on the User Input Node, go to the data tab you will see Inputs that represent your ACs. Click on each one and then set the Save Value As into a PV.
forum.appian.com/.../Saving_Form_Data
Hope that helps
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Siva
Certified Lead Developer
over 12 years ago
I don't think, AC parameter can be saved into PV while using Auto submit.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
raghunandanj3904
Certified Senior Developer
over 12 years ago
Christine: I did that initially and it dint work. So later i tried to map the vlues in output tab, which also failed. When I gave an alert in onSubmit() event, even that dint get alerted which means it was not actually submitting the form.
So i had to use the following code which works fine:
getObject('buttonId').parentNode.firstChild.click();
But for this to work i need to have a button on the form.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 12 years ago
setTimeout(function() {$('input:submit.submitButton')[1].click()},100);
where [1] is the button number from left.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 12 years ago
setTimeout(function(){
document.forms[0].submit();
}, 100);
Might be this solves your problem
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
raghunandanj3904
Certified Senior Developer
over 12 years ago
Hi Sikhivahan, u mean to say i need to set a timeout function with onmousedown event of an image??? I have an image in the form...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Alicia-Jane Dunn
over 12 years ago
I don't think your issue is the pvs, but instead how you're submitting the form. Instead of auto-submitting, you could just associate the image to a "submit" button using the event rules. That way you're using the OOB conversion of the AC to PV variables, while still using your image onClick submission. This is the practice I use, and I never have issues with my variables being saved. I hope this helps.
Form: Load
window.FormAPI.hide("imageButton")
Image Field: Mouse Up
buttonFieldset=window.Build.util.getComponentContainer("imageButton",window.FormDesigner.runtimeNamespace); buttonFieldset[0].firstChild.click();
Button Field:
Button ID = imageButton
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 12 years ago
@raghunandan yes, exactly and even you can follow the approach suggested by aliciad
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
raghunandanj3904
Certified Senior Developer
over 12 years ago
Thanks Alicia and Sikhivahan. Works perfect the way it was required!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel