• 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: Query for field value display's but won't save

Query for field value display's but won't save 9 years 5 months ago #33097

I have created a script to query a value from another table. It display's (pre-fills the field) on the form perfectly when the user is filling the form out but won't save the data to the db thus it won't show in the emails or pdf using its placeholder value. I have checked several times to make sure it is typed correctly. The query is:
//<code>
$user = JFactory::getUser();
$userId = $user->id;
$db = JFactory::getDbo();

if ($userId) {
$db->setQuery("SELECT `editing_level` FROM `#__another_table` WHERE `created_by`='".$userId."'");
return $db->loadResult();
}
//</code>

Used in the default value of the "level" field. Placeholder used in email and pdf {level:value}, db shows no value for the submissions for this field. It like its ok to display, just not save.
Last Edit: 9 years 5 months ago by donaldmoore.
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!