• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: How to let the user add a new item in a dropdown

How to let the user add a new item in a dropdown 15 years 1 month ago #9972

  • Freced
  • Freced's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Is it possible to let the user add a new item/choice to a dropdownfield if the desired choice doesn´t exist in the list?

Also, I would like the new item to be added to the list so that next time it´s available to choose.

Thanks for any help

Fredrik
The administrator has disabled public write access.

Re:How to let the user add a new item in a dropdown 15 years 1 month ago #9979

  • andreic
  • andreic's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 745
  • Thank you received: 66
Hello,

This can be achieved in RSForm! Pro by creating a drop-down list with the preset values and also a text box field in which the user can add another item of his choice. With the help of a script placed in the "Scripts called on form process" section you can verify if a another option was added in the text box field. If it is so then you will have to insert the option in the jos_rsform_properties table and so the item will be added to the drop-down list.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:How to let the user add a new item in a dropdown 14 years 1 month ago #13187

  • bobr
  • bobr's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I have a similar problem. I am populating a dropdown from a table of previous values.
I can add a script that identifies correctly if a new value has been added to the text field. Is there a way with a script to allocate the new value to the result field of the dropdown.

In my case, I have a field of 'Rider' showing previous names. I have a text field called 'NewRider'. In the form Javascript I have this
<script type="text/javascript"> 
function checkvals()
{
if (document.getElementById('NewRider').value != "")
{
alert('There\'s a value ');
return true;
}
else
{
alert('No Value');
return false;
}
}
</script>
That works great, but what I want to do is something like:
(document.getElementById('Rider').value=(document.getElementById('NewRider').value
but I can't get it to work - any clues???
The administrator has disabled public write access.

Re:How to let the user add a new item in a dropdown 9 years 3 months ago #33906

  • kurt5
  • kurt5's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hello,
I know it's an old topic, but I can't find any other talking about such a question.
I'm looking for a similar solution.
In this form there is a dropdown-field called 'clan' : http://www.lanergy.be/inschrijven/inschrijven
When clicking on it, the last option says 'add a new clan'.
When clicking on that option, a new textfield upears underneath and users can fill in a new value.
This value is than added to the list for the new visitors who submit the form.
What should I do to get something similar ?
Kind regards,
Kurt
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!