TOPIC:

Auto select field according to drop down menu 2 weeks 6 days ago #252387

  • Topic Author
  • dvddvddvd
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
Hello,

I would like to know if the following can be done:

I have a "select form list" element with the following values, named "course":
0;Select Course;Teacher
0;Literacy (0ALFB);Jon Perry
0;Express yourself well, you will feel better (0ORT3);Mary Jones
0;Culture for today's world (0CUGM);Jim Luck
0;Cultural breakfasts (0DES1);Eve Smith ...

And another "Text field" element named "teacher"

When selected in the course element: is it possible to automatically fill the teacher element with the value of the teacher column from the course element list?

For example:
if I select "Literacy (0ALFB)", it will automatically appear in the teacher element:
"Jon perry"

Thanks, greetings

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

Auto select field according to drop down menu 2 weeks 6 days ago #252388

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

yep.
Go to this select list->Advanced->Actionscript->check Custom -> check Change and put this:
function ff_nameofyourselectlist_action(element, action)
{
    switch (action) {
        case 'change':
ff_getElementByName('nameofyourtextfieldteacher').value = ff_getElementByName('nameofyourselectlist').value;
            break;
        default:;
    } // switch
} // ff_nameofyourselectlist_action

Please replace:
nameofyourselectlist with name of your select list (not title)
nameofyourtextfieldteacher with name of your textfield for teacher (not title)

Regards,
Tihana

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

Auto select field according to drop down menu 2 weeks 6 days ago #252391

  • Topic Author
  • dvddvddvd
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
Thank you very much, very satisfied, both for the speed in responding, and for the efficiency of the result.
Best regards and happy new year

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

Auto select field according to drop down menu 2 weeks 5 days ago #252443

  • Topic Author
  • dvddvddvd
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
Hello again Thiana,

The above solution works perfectly, but one more question, is it possible to do the same but filling in more fields?
0;Select Course;Teacher;timetable;location
0;Literacy (0ALFB);Jon Perry;from 10am to 11am;classroom 418
0;Express yourself well, you will feel better (0ORT3);Mary Jones;from 6pm to 7pm;classroom 412
0;Culture for today's world (0CUGM);Jim Luck;from 8am to 9am;classroom 023
0;Cultural breakfasts (0DES1);Eve Smith;from 7am to 9am;university bar...

Thanks and Best regards

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

Auto select field according to drop down menu 2 weeks 5 days ago #252444

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

if I understood you correctly then:
function ff_nameofyourselectlist_action(element, action)
{
    switch (action) {
        case 'change':
ff_getElementByName('nameofyourtextfieldteacher').value = ff_getElementByName('nameofyourselectlist').value;
ff_getElementByName('nameofyourothertextfield').value=ff_getElementByName('nameofyourselectlist').value;
//and so on for each field
            break;
        default:;
    } // switch
} // ff_nameofyourselectlist_action

Let me know the result

Regards,
Tihana

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

Auto select field according to drop down menu 2 weeks 4 days ago #252478

  • Topic Author
  • dvddvddvd
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
Hi Thiana,

It cannot be as I have indicated before. Since in the dropdown selection list, you can only put 3 elements: 0/1, the label and the value
When putting more than three values ​​(0;Literacy (0ALFB);Jon Perry;from 10am to 11am;classroom 418) the dropdown field, which gives blank.

I don't know if there will be any other way to do it.
Thanks

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

  • Page:
  • 1
  • 2
Time to create page: 0.050 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!