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

Joomla! 3.x Coding • Re: Registration override with custom fields

$
0
0
Your override code is correct in principle. The custom fields are missing because the fieldset 'customprofile' does not exist. In fact, Joomla 3.10.12 assigns names like 'fields-1' automatically to custom field groups, depending on the id of field group in the database table _fields_groups.

These debugging lines display the structure of the array with the names of the fieldsets.

Code:

        <?php $fieldsetsDefault = $this->form->getFieldsets(); ?><?php $debug = print_r($fieldsetsDefault, true);   echo '<p>' . $debug . '</p>';?>
This screenshot shows an example of a fieldsets array, containing the custom field group 'My Custom Field Group', known in my test by Joomla 3 as 'fields-2'. The field group has one field, 'Custom Text Field'. The first two standard user fields of the registration form are also shown.
User-Registration-Custom-Fields.png

Statistics: Posted by toivo — Thu Feb 22, 2024 7:11 am



Viewing all articles
Browse latest Browse all 2100

Trending Articles



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