TOPIC:

Populating email address from other field 5 years 3 weeks ago #180706

  • Topic Author
  • oshribma
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 40
  • Thanks: 0
Thanks Lovre,

We do not what another select field for this operation. What I have is a Element called "Territory " that has something like:

Group 1;Group 1
Group 2;Group 2
etc... Group 15;Group 15

Group 1 admin email is group1@gmail.com
Group 2 admin email is abc@abc.org
Group 3 admin email is tom@net.ca

What I am looking for is if someone is selecting group 1, then a field labeled AdminEmail gets auto populated with group1@gmail.com.

I hope that this makes sense.

Thank you,

Owen

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

Populating email address from other field 5 years 3 weeks ago #180727

  • lovre's Avatar
  • lovre
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2667
  • Karma: 76
  • Thanks: 329
Hi,

Why are you using the "AdminEmail" field? Just to later use it as an recipient for the submission or you really need that info in the view?

Do you have multiple select lists or just one? If you have only one element then the last solution that i have sent you is tested and working 100%.
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===========================================
Need to renew Pro Support?
Buy Here!
===========================================
Satisfied?
Consider a membership!
===========================================
Like us on Facebook
===========================================

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

Populating email address from other field 5 years 3 weeks ago #180732

  • Topic Author
  • oshribma
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 40
  • Thanks: 0
I have about 12 select elements on the page. Really trying hard not to add another.

Thanks

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

Populating email address from other field 5 years 3 weeks ago #180736

  • lovre's Avatar
  • lovre
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2667
  • Karma: 76
  • Thanks: 329
And all of those 12 elements should set the "AdminEmail" field or just one("Territory" element)?

Why are you using the "AdminEmail" field? Just to later use it as an recipient for the submission or you really need that info in the view?
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===========================================
Need to renew Pro Support?
Buy Here!
===========================================
Satisfied?
Consider a membership!
===========================================
Like us on Facebook
===========================================

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

Populating email address from other field 5 years 3 weeks ago #180799

  • Topic Author
  • oshribma
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 40
  • Thanks: 0
Just the one - Territory. All I am looking for is upon a selection of the territory the correct admin email populates the recipient field on the email templates admin section of the view. if there is away to do this with utilizing the AdminEmail field, I am fine with that.

Again thank you for help so far.

Owen

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

Populating email address from other field 5 years 2 weeks ago #180840

  • lovre's Avatar
  • lovre
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2667
  • Karma: 76
  • Thanks: 329
Hi,

if you don't have to have your "territory" select defined like this:
Group 1;Group 1
Group 2;Group 2
etc... Group 15;Group 15
and you could redifene it like this:
Group 1;Group1@mail.com
Group 2;Group2@mail.com
etc... Group 15;Group15@mail.com
it would be much easier to do it as i described here:
crosstec.org/en/forums/38-foren/113476-p...?limitstart=0#180490


But if you have to keep the current select definition then you should do the following:

go to your "AdminEmail" field. In the ContentBuilder> View> Your View> "AdminEmail" field click the "text" link (see attachment 1). Now go to the Scripts tab> Init (JS)> and paste in some code like this:
jQuery("#cb_4").change(function() {
if (jQuery(this).val()=="Group 1")
{
jQuery("#cb_2").val("group1@gmail.com")
}
else if (jQuery(this).val()=="Group 2")
{
jQuery("#cb_2").val("abc@abc.org")
}
});

Please Note that the #cb_2 and #cb_4 are the id's of the select and textfield elements. You will need to inspect the site when adding submissions to find out what are the id's of your elements (see attachment2).

If you have doubts and problems implementing this, just let us know. You can send us your credentials in your next post if you want us to do this for you.
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===========================================
Need to renew Pro Support?
Buy Here!
===========================================
Satisfied?
Consider a membership!
===========================================
Like us on Facebook
===========================================
Attachments:

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

Last edit: Post by lovre.
Time to create page: 0.092 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!