TOPIC:

value of one field depending on more select-fields 11 months 3 weeks ago #237464

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 386
  • Karma: 4
  • Thanks: 62
Hallo.

So müsste es funktionieren !

Kannst du bitte das angehängte Formular bei dir installieren und Testen ?
Attachments:

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

value of one field depending on more select-fields 11 months 3 weeks ago #237466

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 386
  • Karma: 4
  • Thanks: 62
Hey.

Habe gerade etwas gemerkt.

Dein Code :
var val =JQuery('[name="ff_nm_selekt[]"]').val();

Muss aber so sein
var val =JQuery('[name="ff_nm_Selekt[]"]').val();

Die Namen in Skripten sind case-sensitiv !!! ;)

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

value of one field depending on more select-fields 11 months 3 weeks ago #237468

  • Topic Author
  • Mister.Miracle
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 99
  • Karma: 1
  • Thanks: 1
Hi thank you for your advise :-)
now it works fine for one select-field.

2 questions:
1.)
is it possible to use a execute like this:
ff_getElementByName("SELEKT").hidden=false

2.) if i want a if-then-else-condition over more than one select-field...
on which position i should create the condition?

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

value of one field depending on more select-fields 11 months 3 weeks ago #237482

  • Topic Author
  • Mister.Miracle
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 99
  • Karma: 1
  • Thanks: 1
okay.
i tried on my own a little bit :-)

i got more select-fields named:
- selekt1
- selekt2
- selekt3
- textfield1

now i expand your code a little bit, but it dont work, like i imagine :-(
...
//Condition for selekt!
if(val="SELEKT1_VALUE1") {
   ff_getElementByName("textfield1").value="myText1";
   ff_getElementByName("textfield1").readonly=true;
(...)
this code alone works fine.

now expanded to the selekt2
...
//Condition for selekt!
if(val="SELEKT2_VALUE1") {
   ff_getElementByName("textfield1").value="myTex3";
   ff_getElementByName("textfield1").readonly=true;
(...)

Now both dont change the value to textfield1 :-(Why?

after that...
i created a ff_getElementByName-Part to one of the conditions:
...
//Condition for selekt!
if(val="SELEKT1_VALUE1") {
   ff_getElementByName("textfield1").value="myText1";
   ff_getElementByName("textfield1").readonly=true;
   ff_getElementByName("selekt3").value="SELEKT3_VALUE2";
   ff_getElementByName("selekt3").readonly=true;
(...)
the element is set to SELEKT3_VALUE2 --> it works fine.
But... why it is not readonly? This part dont work :-(

Thank you for your advise :-)

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

value of one field depending on more select-fields 11 months 2 weeks ago #237547

  • Topic Author
  • Mister.Miracle
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 99
  • Karma: 1
  • Thanks: 1
Nobody any idea, how to create the scipt to work with more than one select-fields and one text-field?

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

value of one field depending on more select-fields 11 months 2 weeks ago #237558

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

You can make a select list read-only using this function:
jQuery('[name="ff_nm_selekt3[]"]').attr("disabled", true);

Let me know whether this is working for you.

Regards,

Mihaela

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

Moderators: ForumSupport
Time to create page: 0.093 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

Summer Sale!

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!