Cheryl
river guide Posts:99
|
01-10-2011 02:35 PM |
|
I have a field on my form that is read-only and populated with a total, summing several other fields above it. It works fine while filling out the form, but I just noticed that the calculated value isn't showing in the PDF (form completion event) or View Form Results and confirmed that it is blank in the db.
Do I need to do something extra to ensure that it gets saved with the rest of the form fields?
|
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
01-11-2011 02:27 PM |
|
Hello Cheryl,
This is common with read only fields, so what you can do instead is have a hidden field that contains the total sum and have your read only field equal what your hidden field equals.
Then in your PDF use the hidden field's token name instead of trying to use the read only field.
If you need additional information on how to do this please let me know, as I understand this can be confusing.
Thanks,
Ryan
|
|
|
|
|
Cheryl
river guide Posts:99
|
01-12-2011 11:43 AM |
|
I added the hidden field and changed all the client-side events to total for that new field. That fixed showing the total on the PDF created by a form completion event... but I guess I need help with how to set the value of the read-only field to the hidden field. I tried a couple of things but neither of them worked ($(Field1)=$(Field2) in the client-side event for the read-only field and whne that didn't work, tried putting $(Field2) in the default value), so I don't know how to do that.
HELP!? Thanks... |
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
01-13-2011 09:01 AM |
|
Hello Cheryl,
Assign the Hidden field under Module Configuration -> Custom JavaScript and in the initial JavaScript please assign it here.
$(ReadOnlyField) = $(HiddenField)
You should also do this in each and every on client side event sections with the fields involved in the calculation, with the exception of putting this assignment in the Hidden Field which is the real total and the readonly field which is a reflection of the real total.
If you have any questions please let me know.
Thanks,
Ryan
|
|
|
|
|