TOPIC:

Text fields populate a list 1 week 5 days ago #250839

  • Topic Author
  • Luisserafim
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 112
  • Thanks: 0
Hello!

Is it possible to populate a list with names already entered in a previous page?

Example:
We have several text fields with names.

Later on in the form we ask to identify an element and for that a list appears with the names previously entered.

Best regards

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

Text fields populate a list 1 week 5 days ago #250840

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

yes.
It is possible.
E.g.
if you have 2 textfield with name text1 and text2
and select list with name lista->in this select form list list is defined as 0

Go to first textfield->Advanced->Actionsctipt->check Change->and put this:
function ff_text1_action(element, action)
{
var elem=ff_getElementByName('lista').value;
var opt = document.createElement('option'); 
opt.value=ff_getElementByName('text1').value;
opt.innerHTML=ff_getElementByName('text1').value;
ff_getElementByName('lista').add(opt);
} // ff_text1_action
Replace lista with name of your select list (not title), and text1 with name of your first textfield (not title)

Go to second textfield->Advanced->Actionscript->check Change and put this:
function ff_text2_action(element, action)
{
  var elem=ff_getElementByName('lista').value;
var opt = document.createElement('option'); 
opt.value=ff_getElementByName('text2').value;
opt.innerHTML=ff_getElementByName('text2').value;
ff_getElementByName('lista').add(opt);
} // ff_text2_action
Replace lista with name of your select list (not title), and text2 with name of your second textfield (not title)

And so on for each textfield.

Regards,
Tihana
The following user(s) said Thank You: Luisserafim

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

Last edit: Post by tihana.krivic.

Text fields populate a list 1 week 4 days ago #250855

  • Topic Author
  • Luisserafim
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 112
  • Thanks: 0
Hi Tihana!

what do you mean "in this select form list list is defined as 0"?

It does not work...

Tx in advance

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

Text fields populate a list 1 week 4 days ago #250857

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

select list->Element Properties->List->set 0
Here is an example:

File Attachment:

File Name: form_textfield.zip
File Size:7 KB



Regards,
Tihana
Attachments:
The following user(s) said Thank You: Luisserafim

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

Last edit: Post by tihana.krivic.

Text fields populate a list 1 week 4 days ago #250861

  • Topic Author
  • Luisserafim
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 112
  • Thanks: 0
ITS ALIVE!

Tx so much Tihana, it works :)))) Ad to clean the cache.

1 more question to you.

If I have 2 lists like that do you recomend:

Make the text fields populate 2 ou 3 diferent lists
or
Make a copy of list 1 to list 2 and list 3?

Best Regards :)

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

Text fields populate a list 1 week 4 days ago #250863

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

I will test it on example from message above and get back to you

Regards,
Tihana

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

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