× Form Help

Textfield does not show calculated value

  • sonnyp
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0

sonnyp created the topic: Textfield does not show calculated value

Any help would be greatly appreciated.

I have the following code to which calculates an estimated price based on user selections from Radio Groups. I get the value of EstimatedPrice in email BUT this same value does not show up in the Textfield named EstimatedPrice.

I've been scratching my head for hours now. Can any help PLEASE?
function ff_InstantQuote_init()
{
setInterval('myFunction()',500);
} // ff_InstantQuote_init

function myFunction()

{
ff_getElementByName('EstimatedPrice').value =
Number(jQuery('[name="ff_nm_Walls[]"]:checked').val()) + 
Number(jQuery('[name="ff_nm_SlidingDoorsNo[]"]:checked').val()) +
Number(jQuery('[name="ff_nm_DoorColour[]"]:checked').val()) +
Number(jQuery('[name="ff_nm_DoorFrameColour[]"]:checked').val()) +
Number(jQuery('[name="ff_nm_InternalDesign[]"]:checked').val());
}
#232889
  • Posts: 1965
  • Karma: 67
  • Thank you received: 238

mihaela replied the topic: Textfield does not show calculated value

Hello,

From what I can see your code seems fine.

Can you please try to recreate the 'EstimatedPrice' field and see whether it makes the change.
Also, make sure that 'EstimatedPrice' is the Name of the field, not the title.

Regards,

Mihaela
#232891
  • sonnyp
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0

sonnyp replied the topic: Textfield does not show calculated value

mihaela wrote: Hello,

From what I can see your code seems fine.

Can you please try to recreate the 'EstimatedPrice' field and see whether it makes the change.
Also, make sure that 'EstimatedPrice' is the Name of the field, not the title.

Regards,

Mihaela


Hi Mihaela,

Thanks for responding. I’ve tried what you said and EstimatedPrice is the name but still the same result.

The thing is this is a muti page form. When I place the EstimatedPrice field on a single page adding just 2 radio group it works but not at end of form after3 pages.

So the problem seem to be multiple pages but have no idea how to solve it. Any idea?
#232914
  • Posts: 1965
  • Karma: 67
  • Thank you received: 238

mihaela replied the topic: Textfield does not show calculated value

Hello again,

In that case please create a package with your form as explained here crosstec.org/en/support/online-documenta...ted/94-packages.html , zip it and send it here as an attachment so I can test it and try to figure out why it is not working.

Regards,

Mihaela
#232920
  • sonnyp
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0

sonnyp replied the topic: Textfield does not show calculated value

Hi Mihaela,
Thank you so much for your help! Pls find attached package.

Even though the textfield "EstimatedPrice1" shows "0" but on the email generated by BF shows the calculated value. Here's the result of the email:

Walls:: 50
Sliding Doors:: 395
Price:
Door Colour:: 200
Frame Colour:: 1
Internal Design:: 500
Estimated Price1: 1146

Pls note when I changed the code to show calculated value "price" on page 1, it works. but when i tried to show the same value on another page, it just doesn't work.

Thanks again!

Sonny

File Attachment:

File Name: mypck_001_...2-20.zip
File Size:39 KB
#232952
Attachments:
  • Posts: 1965
  • Karma: 67
  • Thank you received: 238

mihaela replied the topic: Textfield does not show calculated value

Hello and Happy New Year,

Sorry for the late response, Crosstec Support staff was on collective holiday vacation, as noted in the forum.

After looking at your form, I realized what the problem was. The problem is that you have made the last page of your form as a "Thank you page", but you've also put the Textfield element on that page.

The "Thank you page" shouldn't consist of any fields. The reason is that this page is displayed after the form was submitted to the textfield "Estimated Price1" is no longer affected by it.

To sum up, to resolve the problem, you simply need to uncheck the Last page is thank you page in your form's Properties.

Also, there are errors in your form caused by Actionscripts that you have set to "Custom", but haven't defined. To solve that problem, just set Actionscript Type to None for each element and save the change.

Let me know whether after you do so, your form works as expected.

Regards,

Mihaela
#233034
Moderators: ForumSupporttomeperica
Time to create page: 0.069 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here