• 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: Populate data from another rsform form for Dropdow

Populate data from another rsform form for Dropdow 10 years 11 months ago #27770

Hi;

Can anyone show me, how can I auto populate textbox datas from another RSform form to dropdown component?

thank you
The administrator has disabled public write access.

Populate data from another rsform form for Dropdow 10 years 11 months ago #27771

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
You can find in the following article, detailed instructions on how to autopopulate a list from a table. The only thing you need to add in the querry is the FormId of the other Form.

e.g.
 
$db->setQuery("SELECT your_value, your_label FROM #__rsform_submission_values WHERE FormId=id_of_form");
 
My help is not official customer support. To receive your support, submit a ticket by clicking here
The administrator has disabled public write access.

Populate data from another rsform form for Dropdow 10 years 11 months ago #27772

cosmin.cristea wrote:
You can find in the following article, detailed instructions on how to autopopulate a list from a table. The only thing you need to add in the querry is the FormId of the other Form.

e.g.
 
$db->setQuery("SELECT your_value, your_label FROM #__rsform_submission_values WHERE FormId=id_of_form");
 

Thanks for your interest firstly. But I get this error:

Unknown column 'Ad' in 'field list' SQL=SELECT Ad, soyad FROM jos_rsform_submission_values WHERE FormId=3

But I know and sure "Ad" is in table.

This is my code:
//<code>
$items = array();
$db = JFactory::getDbo();
$items[] = "|Please Select[c]";
$db->setQuery("SELECT Ad, soyad FROM #__rsform_submission_values WHERE FormId=3");
$results = $db->loadObjectList();
foreach ($results as $result) {
  $value = $result->Ad;
  $label = $result->soyad;
  $items[] = $value.'|'.$label;
}
$items = implode("\n", $items);
return $items;
//</code>


and my phpmyadmin tabele values are like this:

SubmissionValueId FormId SubmissionId FieldName FieldValue
869 3 49 Adres
868 3 49 gsm
867 3 49 faks
866 3 49 Telefon
865 3 49 Yetkili_adi
864 3 49 Vergino
863 3 49 vergi_dairesi
862 3 49 unvan
861 3 49 TCNo
860 3 49 soyad
859 3 49 Ad Emrah


Please help. I can't see my mistake.

Thank you.
The administrator has disabled public write access.

Populate data from another rsform form for Dropdow 10 years 11 months ago #27773

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
These are the columns you have in your table :

Submission | ValueId | FormId | SubmissionId | FieldName | FieldValue

e.g.
$db->setQuery("SELECT FieldName, FieldValue #__rsform_submission_values WHERE FormId=3");
My help is not official customer support. To receive your support, submit a ticket by clicking here
The administrator has disabled public write access.

Populate data from another rsform form for Dropdow 10 years 11 months ago #27774

cosmin.cristea wrote:
These are the columns you have in your table :

Submission | ValueId | FormId | SubmissionId | FieldName | FieldValue

e.g.
$db->setQuery("SELECT FieldName, FieldValue #__rsform_submission_values WHERE FormId=3");

Then Why am I getting this error: Unknown column 'Ad' in 'field list' SQL=SELECT Ad FROM jos_rsform_submission_values WHERE FormId=3
$db->setQuery("SELECT Ad FROM #__rsform_submission_values WHERE FormId=3");

I can't see any mistake.
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!