TOPIC:

Reset Selectlist 3 weeks 5 days ago #253651

  • Topic Author
  • mrperfectpz
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 395
  • Thanks: 0
Hi

Once a selectlist has been selected and the value sent to a textfield, how can I reset the selectlist ?

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

Reset Selectlist 3 weeks 5 days ago #253655

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

like this:
function ff_nameofselectlist_ction(element, action)
{
    switch (action) {
        case 'change':
ff_getElementByName('nameoftextfield').value=ff_getElementByName('nameofselectlist').value;
ff_getElementByName('nameofselectlist').options.length=0; //this will reset selectlist
           break;
        default:;
    } // switch
} // ff_nameofselectlist_action

Regards,
Tihana

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

Reset Selectlist 3 weeks 3 days ago #253719

  • Topic Author
  • mrperfectpz
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 395
  • Thanks: 0
Sorry, I dont mean clear it, just sort of refresh so ready to start again

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

Reset Selectlist 3 weeks 3 days ago #253720

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

if select list is defined like this:
0;Please select;
0;Title 1;value1
0;Title 2;value2
0;Title 3;value3
then when value is sent to textfield, the select list should be reset like this:
function ff_nameofselectlist_ction(element, action)
{
    switch (action) {
        case 'change':
ff_getElementByName('nameoftextfield').value=ff_getElementByName('nameofselectlist').value;
ff_getElementByName('nameofselectlist').value='';
           break;
        default:;
    } // switch
} // ff_nameofselectlist_action

Regards,
Tihana

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

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