• 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 automatically refresh read-only fields

How to automatically refresh read-only fields 4 days 5 hours ago #44000

Hi,
I describe the “scenario.”
  1. I created a form to ask business information about my services.
  2. All fields in the form are mapped to fields of a custom Joomla table ‘#__sales_info’.
  3. In this form the 'sales-city' field is a dropdown populated by a PHP code
//<code>
$items = array();
$db = JFactory::getDbo();
$items[] = "|Selezionare[c]";
$db->setQuery("SELECT cityName FROM #__Cities ORDER BY cityName ASC");
$results = $db->loadObjectList();
foreach ($results as $result) {
    $items[] = $result->cityName . '|' . $result->cityName;
}
return implode("\n", $items);
//</code>
  • In the form there are two other fields, 'sales-zipcode' and 'sales-county', which are read-only and should be populated by the values retrieved from the '#__Cities' Joomla table when a city is chosen in the 'sales-city' field.

  • I was thinking of creating a plugin to achieve this, but maybe there is an easier method to get the same result.
    Can you guys help me with this?
    Thanks and have a nice day
    Gaetano
    Gaetano
    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!