• 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: Auto-populate the list (dropdown) with submission

Auto-populate the list (dropdown) with submission 10 years 2 months ago #26517

  • danilofagundes
  • danilofagundes's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Thank you received: 5
Good morning, how to auto-populate the list (dropdown) with the data submission per user?

example:
In form3, there are three TESTBOX.
textbox1
textbox2
textbox3

How to load the list of submission textbox1, the form3 in a dropdown in another form?
display only the data of the author of the submission.

these examples learned how to load the information of the connected user joomla and from a generic database:

www.rsjoomla.com/support/documentation/v...mmunity-builder.html
www.rsjoomla.com/support/documentation/v...st-from-a-table.html

but have not found how to load in a dropdown with data submissions

Thanks in advance and sorry for my english.
The administrator has disabled public write access.

Auto-populate the list (dropdown) with submission 9 years 7 months ago #28632

  • Todecay
  • Todecay's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
My question is almost the same.

How can I auto populate a dropdown in 'Form 1' with submissions from an other RSFormPro form (let's say Form 2)?
The administrator has disabled public write access.

Auto-populate the list (dropdown) with submission 9 years 7 months ago #28684

  • adela
  • adela's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Go to your form and open the dropdown item. Place this inside the box that says "items". Make sure to change the values for your own on this line only: WHERE FormId = 4 AND FieldName = 'Empresa' ---- number 4 should be changed to the form id of the form where the users entered the desired data, not the present form we're working on. Empresa is the name of the item back in the old form, not in this one.

<code>
$items = array();
$db = JFactory::getDbo();
$items[] = "|Seleccione la empresa[c]";
$db->setQuery("SELECT FieldValue, FieldName FROM #__rsform_submission_values WHERE FormId = 4 AND FieldName = 'Empresa'");
$results = $db->loadObjectList();
foreach ($results as $result) {
$value = $result->FieldValue;
$label = $result->FieldName;
$items[] = $value.'|'.$value;
}
$items = implode("\n", $items);
return $items;
</code>

I didn't write this myself. I found it somewhere but can't find the link anymore.
The administrator has disabled public write access.

Auto-populate the list (dropdown) with submission 7 years 8 months ago #35578

  • cjmicro
  • cjmicro's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 5
$items[] = "|Seleccione la empresa[c]";


what goes in this area? it's not a field name, so not sure what to put for my form here.
Cheryl
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!