Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1447

Extensions for Joomla! 5.x • Joomla Custom Fields / RSForm / PDF

$
0
0
Hi guys,
is it possible, that there in this highly qualified group of people is someone who that can help me out on this little problem:

I want my Joomla Custom Fields, to integrate in the User pdf's, when using RSforms.

I use this code snippet (placed in RSforms "</>PHP Scripts - Pre-Processing" field) to do that (one snippet per Custom Field):

Code:

// CUSTOM FIELD: DOCUMENT NAME$customFieldName = '291-doc-name';$articleID = JFactory::getApplication()->input->get('id');$db = JFactory::getDbo();// Do not edit below// Ensure article exists$query = $db->getQuery(true);$query->select('*')->from('#__content')->where('id=' . $db->q($articleID));$db->setQuery($query);if ($db->loadObject()){    $db->setQuery("SELECT value FROM #__fields_values LEFT JOIN #__fields ON (#__fields.id = #__fields_values.field_id) WHERE item_id = " . $db->q($articleID) . " AND name = " . $db->q($customFieldName));    if ($result = $db->loadResult())    {        $val['hidden-291-doc-name'] = $result;    }}
- and it works perfectly fine - until I get to the SUB-FORMS field type - then I get a "blank" output.

Can anyone suggest how to re-write the snippet for it to work with SUB-FORM fields?

kr. John.

(PS: I have contacted RSjoomla to ask for help, but it is against their policy to help their customer solve problems like this. I have even asked them if they could suggest somebody who could help- but got same answer - its against their policy)

Statistics: Posted by JOHNRJUHL — Fri Jul 26, 2024 9:52 am



Viewing all articles
Browse latest Browse all 1447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>