Select list from a proeviously given textfield

  • gtgt
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1

gtgt replied the topic: Select list from a proeviously given textfield

Dear Michaela,

Thanks for your help.Your code works well. I tryed to adapt it to a very similar form, but I could not manage it. The adaptation was not succesful.

That is a bit more difficult stucture, because the option1... option4 field generated by another fields tex fields.

misterycity.com/mistery-city-adventure-e...mistery-city-piclist

Do you have any idea what els should be changed?

Thanks in advanced.
#232518
  • Posts: 1437
  • Karma: 48
  • Thank you received: 188

mihaela replied the topic: Select list from a proeviously given textfield

Hello again,

In case the fields option1... option4 in that other form aren't changed manually, but generated by another textfields, setion Actionscript on change won't work properly.

That is why would suggest that you implement the code the following way:
Navigate to your form's Advanced options > More options > Scripts and in the Initialization script section set Type to Custom.

In the code area below put code similar to this:
function ff_formname_init()  {
   setInterval(setlist, 500);
} // ff_formname_init

function setlist() {
   var list = ff_getElementByName('answer_01');
   for (var i = 1; i <= 4; i++){
           list.options[i] = new Option(ff_getElementByName('option'+i).value, 
          ff_getElementByName('option'+i).value, true, false); 
          }
}
NOTE: In the code above replace formname with the Name of your form.

Let me know whether you've managed to apply this and whether it worked properly.

Regards,

Mihaela
#232543
Moderators: ForumSupporttomeperica
Time to create page: 0.066 seconds

New Support System

Dear Customers,

Users with active subscription have support priority which will be dona via ServiceDesk (My Account > Raise a ticket).
FREE Support topics will be answered when AND if there is time.

You can check support guidelines here : here

Regards,
Crosstec Team

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here