Expand my Community achievements bar.

SOLVED

Please Help A Newbie!

Avatar

Level 2

Please forgive me for what may seem like an easy question for many of you, but I am new to LiveCycle and I do not know how to write code.  My situation is as follows - I am trying to create a form for a not-for-profit community theatre.  I have no problems setting everything up but the calculations.  I have six checkboxes for donations ($50, $75, $100, $199, $500 and "other").  Situated beside the "other" checkbox is a numeric field that I have named "other amount".  I also have a numeric field named "total amount".  I want to be able to calculate a running total of the value of each checked box plus the value of the "other amount" numeric field (if the "other" checkbox is clicked) and be displayed in the "total amount" numeric field.

This is secondary, but I'd also like to be able to export the "total amount" numeric field value (once calculated) to our PayPal donations page. (I am not even sure if this is possible).

Both FormCalc and Javascript seems alien to me, so please "dumb it down" for me.  I appreciate any help any one could give me on this.  I have been trying to figure this out for a week now and I am beginning to go batty. (well, battier).  Thanks very much.

Sincerely,


Boondawg 760

P.S.  I am unsure if this will explain things more clearly, but the form can be found at the following url: www.chathamcapitoltheatre.com/contribute/ccta_paving_stone_campaign.pdf  Thanks again.  I will be indebted to whomever helps me with this.

1 Accepted Solution

Avatar

Correct answer by
Level 6

Post the dynamic pdf to the forum and I'll show you how to wire it up.

Paypal is a little more complicated.  Unless you have Reader Extensions available you will not be able to access web services from the form, so you can't post directly from the form itself.  If the Submit button is wired to post back the XML data to your web page, then your web page can parse the data and call the Paypal API to submit the charge.  

View solution in original post

12 Replies

Avatar

Correct answer by
Level 6

Post the dynamic pdf to the forum and I'll show you how to wire it up.

Paypal is a little more complicated.  Unless you have Reader Extensions available you will not be able to access web services from the form, so you can't post directly from the form itself.  If the Submit button is wired to post back the XML data to your web page, then your web page can parse the data and call the Paypal API to submit the charge.  

Avatar

Level 2

Wow - thank you so much - you are a life saver - I have been working on a nicer layout of the pdfI posted in the thread (all the same fields, but a different layout). I'd like to post that one, if it's ok.

I'm almost speechless that such a quick reply came. Thank you so much. As far as PayPal is concerned, I am not too worried about it -donors will just have to take one extra step - I was thinking I could take the PayPal code from our webpage and somehow put it into the form, but I am not worried about it. I genuinely appreciate your help. Thanks again.

Sincerely,

Dan Delanghe

P.S. Please keep in mind that the attached file does not have reader usage rights enabled. I will also post to the forum. Thanks.

Date: Wed, 6 Jan 2010 11:41:56 -0700

From: forums@adobe.com

To: ddelanghe1@live.ca

Subject: Please Help A Newbie!

Post the dynamic pdf to the forum and I'll show you how to wire it up.

Paypal is a little more complicated. Unless you have Reader Extensions available you will not be able to access web services from the form, so you can't post directly from the form itself. If the Submit button is wired to post back the XML data to your web page, then your web page can parse the data and call the Paypal API to submit the charge.

>

Avatar

Level 2

Unfortunately our submit button is wired to return a pdf document via email.  Tying a document to our database is beyond our scope at present and the girls who enter the data thought that returning a pdf via email would be easiest.  I hope I am responding correctly to what you had told me earlier.  I definitely owe you.

Avatar

Level 6

The new layout looks nice, but where do you want the total displayed?

Avatar

Level 2

thank you - I want to put the amount corresponding to the check boxes (i.e. $50, $75, $100, $199 (paving stone), $500 (seat sponsorship) or "other" (I want whatever amount is entered in the "other amount" text field to be added and the result to appear in the "total amount" text field (labelled in dark red font).

Thank you so much for all of this. I genuinely appreciate this and if there is anything I can do please let me know. Thanks again.

Date: Wed, 6 Jan 2010 22:11:53 -0700

From: forums@adobe.com

To: ddelanghe1@live.ca

Subject: Please Help A Newbie!

The new layout looks nice, but where do you want the total displayed?

>

Avatar

Level 2

Here is the form with a "total amount" text field in it.

Thanks again, I really appreciate this.

Avatar

Level 2

my apologies, I sent you the wrong form - not only am I a newbie, but I can be brain dead too. Sorry about that.

Date: Wed, 6 Jan 2010 22:11:53 -0700

From: forums@adobe.com

To: ddelanghe1@live.ca

Subject: Please Help A Newbie!

The new layout looks nice, but where do you want the total displayed?

>

Avatar

Level 6

Here's the updated form.  I did a few things:

  • I added javascript code to the calculate event for the Total Amount field.  It looks at all of the checkboxes and adds in the associated amount for any that are checked.  If the Other field is checked, it adds the amount in the Other Amount field.
  • I added javascript code to the change event of each of the Donations checkboxes to make them mutually exclusive, so that if one is checked the others will be cleared.  It seems to make sense that only one of those should be checked.  The Other Amount field is disabled unless the Other checkbox is checked.
  • I changed the name of the "seventy-five" field to "seventy_five".  A dash in the field name looks like a minus sign to the scripts and causes errors.

That should do the trick.  Let me know if you have any more questions.

Kevin

Avatar

Level 2

Kevin:

Thank you so much - you are a lifesaver.  Like I said, if you need anything, please contact me.  Thanks again.

Avatar

Level 6

LOL, maybe my name should be inscribed on a paving stone. Post again if you need any more help.

Avatar

Level 2

Kevin:

Who knows maybe I will - I am probably not done asking questions yet. I hope you don't mind. Thanks.

Date: Thu, 7 Jan 2010 12:23:01 -0700

From: forums@adobe.com

To: ddelanghe1@live.ca

Subject: Please Help A Newbie!

LOL, maybe my name should be inscribed on a paving stone. Post again if you need any more help.

>

Avatar

Level 2

Okay, so here's

my next question:

I am looking at the XML, but I can't figure it out.  Is there any way to see just the script itself? and, what do I do with it once I get it (i.e. where do i put the script? does anything go into the head of the document? etc.).

Also, how difficult is it to do using multiplication.  I am creating a form for people to join as members of the theatre; each membership cost $20 CAD.  I have created the contact info (1 member) and a field for the names and emails of up to five other members.  I want to be able to have a "total amount" field on the page the displays (returns) the value of $20 CAD for each of the name fields.  However, I want to leave the paving stone, seat sponsorship and other donation fields on the page, so that the "total amount" field will display a grand total of: $20 per member entered (including the form filler - the person whose info is under the Contact Information section) + any checkboxes checked (i.e. paving stone, seat sponsorship, or a $50, $75, $100 or other donation)

Finally (for now), I want the form to be filled in and returned as PDF (no problem - I just use a button and change it to a 'submit' button; I even know how to add the Subject line (e.g. info@chathamcapitoltheatre.com?Subject=PavingStoneCampaign ).  How do I add text for the body?  Is there a way to not only send the email as a pdf to us, but also automatically send a thank you email (with subject and body text) to the person who filled out the form?

Any answers from anyone regarding these questions would be deeply appreciated.

P.S.  Kevin, thanks again for all of your help - you've been great!  Have a good weekend.  Thanks alot.

Boondawg760