I have used an image in the form which is used to auto submit on the click. docu

Certified Senior Developer
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

Parents
  • 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
Reply
  • 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
Children
No Data