TOPIC:

Accordeon Section with fields price calculation 1 year 11 months ago #238297

  • Topic Author
  • wegwb
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 9
  • Thanks: 0
Hi there,
i need your help.

Ive to create a form thats represent some offers for catering and we would like to organized thats categorys with accordeon headlines. E.g. Kalte Platten, Salate, Suppen, Fleisch and so on. The user have now the choice to see the offers inside this section.
Inside the accordeon there are many food articles like differs met products(pork, beef, chicken)
Behind these fields are placed the prices thats are invisible for the user and the possiblity to insert a ammount of products for the users choice.
CheckboxDescription of the productammount
After some sections of the products the user should have visible a summery price and the possiblity to change the checkboxes(choice of products) and set the ammount of products to passed his budget. Atfer the submit the list with ordered products its to e-mail to the client and me. I hope my decription its easy understanding.

Can anyone give me an example for that?

Please Log in or Create an account to join the conversation.

Accordeon Section with fields price calculation 1 year 11 months ago #238303

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello,

I am not sure about every part, but I get the general idea about what you want to achieve.

Create all the elements that you want to have in the form and add a "total" filed at the end. You can use select list for each of the meals defined like follows:
0;0;
0;1;1
0;2;2
...

Then add an additional page to your form which will be consisted of summarize elements for each field in your form.
In the Properties of the summarize elements, check the "Hide row if empty" checkbox so that meals which were not selected do not appear in the summary.
A user won't be able to change the quantity there, but he can go back and correct quantity if wanted.

As for calculating the total, do as follows.

Go to form's Advanced properties > More options > Scripts and in Initialization script set Type to Custom and put there the following code:
function ff_FORMNAME_init()
{
setInterval('calc()', 500);
} // ff_FORMNAME_init


function calc() {

var total = 0;

total = Number(ff_getElementByName('chicken').value) * 6 + Number(ff_getElementByName('beef').value) * 8 + Number(ff_getElementByName('pork').value) * 7;

ff_getElementByName('total').value = total;

}
NOTE: In the code above replace FORMNAME with the Name of your form.
Also, in the code replace 'chicken' with the name of the field in your form and 6 with the price for that concrete meal. Add to the sum all of the meals from your form.

Let me know whetehr this helped.

If you have more questions, feel free to ask.

Regards,

Mihaela

Please Log in or Create an account to join the conversation.

Accordeon Section with fields price calculation 1 year 11 months ago #238309

  • Topic Author
  • wegwb
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 9
  • Thanks: 0
Okay sometimes i can give u an optic example with 2 accordeon with list inside.
Maybe u can see whats the form should do.
example accordeon form(only visuell)https://macherclub.de/partyservice

Please Log in or Create an account to join the conversation.

Accordeon Section with fields price calculation 1 year 10 months ago #238382

  • Topic Author
  • wegwb
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 9
  • Thanks: 0
Hello Mihaela,

u described a solution with select list. Ive created now an form with checkbox and a textfield(integer only) with the ammount of the choice. Thats the base for all other products. Now im ask u How can i set the fields right?
1. Only calculate price if checked the checkbox than with the ammount of the textflied input.
2. How can is set page´s to an accordeon?

i would be happy for an answer.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.045 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

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!