TOPIC:

Combining Multiple Elements into One Element 1 week 2 days ago #243443

  • bruce@brucedill.com's Avatar Topic Author
  • bruce@brucedill.com
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 510
  • Karma: 1
  • Thanks: 9
Breezing Forms

Elements = A, B, C, D

On SUBMIT I would like to combine elements A, B, and C and save them into element D.

How do I do this?

Thank you so much for your help.

Bruce

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

Combining Multiple Elements into One Element 1 week 2 days ago #243445

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 233
  • Karma: 3
  • Thanks: 40
Hi,

For example:
Go to your form->Advanced->more options->Scripts->
Initialization Script->Custom->Create code framework and try this:
function ff_comb_init()
{
  setInterval(calc, 500);
} // ff_comb_init

function calc() {
ff_getElementByName("d").value=ff_getElementByName("a").value+ff_getElementByName("b").value+ff_getElementByName("c").value;
}
Note: comb is name of form. Please replace comb with your form name, and a,b,c,d is name for form element A,B,C,D. Please replace this with your name for A,B,C,D.

Let me know if you want this.

Regards,
Tihana

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

Last edit: Post by tihana.krivic.

Combining Multiple Elements into One Element 1 week 2 days ago #243477

  • bruce@brucedill.com's Avatar Topic Author
  • bruce@brucedill.com
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 510
  • Karma: 1
  • Thanks: 9
That is working perfectly BUT, how do I put a space between the fields?

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

Combining Multiple Elements into One Element 1 week 2 days ago #243479

  • bruce@brucedill.com's Avatar Topic Author
  • bruce@brucedill.com
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 510
  • Karma: 1
  • Thanks: 9
AND how do I insert a space+a word like "Breeder:"

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

Combining Multiple Elements into One Element 1 week 2 days ago #243480

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 233
  • Karma: 3
  • Thanks: 40
Hi,

To add space you need add " ":
function ff_comb_init()
{
  setInterval(calc, 500);
} // ff_comb_init

function calc() {
ff_getElementByName("d").value=ff_getElementByName("a").value+" " +ff_getElementByName("b").value+" " +ff_getElementByName("c").value;
}

Regards,
Tihana
The following user(s) said Thank You: bruce@brucedill.com

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

  • Page:
  • 1
Time to create page: 0.050 seconds

July Sale!

Discounts for all of our extensions + support. Ending July 31st!

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!