• 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: Mapping Joomla custom fields to RSForms Pro fields

Mapping Joomla custom fields to RSForms Pro fields 4 years 10 months ago #39228

  • arnaud2
  • arnaud2's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi.
I'm a newbie here. I'm using Joomla 3.9 custom fields in my registration process. Works fine.
I would like to autofill some fields of a RSForms Pro form with values collected in the Joomla custom fields.
Is it possible and how to do that?
Thanks.
Arnaud
The administrator has disabled public write access.

Mapping Joomla custom fields to RSForms Pro fields 4 years 10 months ago #39244

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

Based on the examples from this article, you can try using a similar as the following snippet instead (whereas 0 zero, will be the first custom field data of the logged in user in question, 1 the next custom field and so on):
//<code>
$customFields = FieldsHelper::getFields('com_users.user', JFactory::getUser(), true);
return $customFields[0]->value;
//</code>
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.
The following user(s) said Thank You: arnaud2

Mapping Joomla custom fields to RSForms Pro fields 4 years 10 months ago #39268

  • arnaud2
  • arnaud2's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Thanks for that.
I customized it a bit :
//<code>
$customFields = FieldsHelper::getFields('com_users.user', JFactory::getUser(), true);
$customField = 'nameOfCustomFieldDefinedInJoomlaBackend';
 
$key = array_search($customField,array_column($customFields, 'name'));
return $customFields[$key]->value;
 
//</code>
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!