• 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 field based on other field

auto populate field based on other field 6 years 3 months ago #38824

hello,

I am not getting value based on value selected in 'Crop Major Cat' field

//<code>
$db = JFactory::getDbo();
$db->setQuery("SELECT `cat1_id` FROM `josbw_cck_store_form_cat1` WHERE `category1`='{field_name:Crop Major Cat}' LIMIT 1");
return $db->loadResult();
//</code>

Form fields (query is for Major Cat ID)
Crop Major Cat
Major Cat ID
Crop Minor Category

Table extract

cat1_id,category1
0,RJ Test1
11,Major 1
12, Major 2
The administrator has disabled public write access.

auto populate field based on other field 6 years 3 months ago #38827

Also note 'Crop Major Cat' is dropdown based on same table 'Cagegory1' column.
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!