• 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: Use text field as input to lookup database info

Use text field as input to lookup database info 8 years 5 months ago #36090

  • eldhrin
  • eldhrin's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi All

Im an absolute beginner at php/JavaScript and understaning all the posibilities with RSForm Pro.

I have spent the most of my day trying to make the following work.

I have a form - where a user can choose to enter an "id".
If the user have entered this before it is in the database and should be retrieved with all the information for different fields.

So for my fields i have a lookup in the database - and it works (kinda).

//<code>
$db = JFactory::getDbo();
$db->setQuery("SELECT far_navn FROM #__showcats WHERE `stambogkey`='Here i would like the value of the field the user filled out' LIMIT 1");
return $db->loadResult();

//</code>

I could then have this code in all the fields where i need to lookup database values - or i could choose to make one big lookup on form Display, and use other scripts i have found to use str_replace.
But i cant seem to get my entered data from first field to either go to a variable or to the code for the dbquery.

Do someone have any suggestions on how to proceed with this.
And please let me know if i havnt explained it proper.

tnx
Jørgen
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!