- Posts: 4
- Thank you received: 0
Please post all pre-sales questions of all products on this forum
Template Override Call custom fields
- Claudio
- Topic Author
- Offline
- New Member
-
Less
More
9 years 11 months ago #64372
by Claudio
Template Override Call custom fields was created by Claudio
Hi, I'm am using a template override for the profile default.php and I need to only show certain custom fields as I don't want the customer to be able to change these fields.
To stop calling all the fields I deleted lines 249-265 - working well.
$fields = $this->form->getFields();
if (isset($fields))
{
$selectedState = $fields->value;
}
foreach ($fields as $field)
{
echo $field->getControlGroup($bootstrapHelper);
}
Now, how do I call individual custom fields I created (read-only). I know I can call <?php echo $this->item->first_name; ?> but I am having problems calling my custom fields osm_directory or osm_services_categories (multi-select fields) etc..
Is there an easy way of doing this?
Regards
Claudio
To stop calling all the fields I deleted lines 249-265 - working well.
$fields = $this->form->getFields();
if (isset($fields))
{
$selectedState = $fields->value;
}
foreach ($fields as $field)
{
echo $field->getControlGroup($bootstrapHelper);
}
Now, how do I call individual custom fields I created (read-only). I know I can call <?php echo $this->item->first_name; ?> but I am having problems calling my custom fields osm_directory or osm_services_categories (multi-select fields) etc..
Is there an easy way of doing this?
Regards
Claudio
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 11 months ago #64375
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Template Override Call custom fields
You want to display the input for that field ? Or just display the entered value for that field ?
Please let me know so that I can look at it and guide you
Tuan
Please let me know so that I can look at it and guide you
Tuan
Please Log in or Create an account to join the conversation.
- Claudio
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
9 years 11 months ago #64419
by Claudio
Replied by Claudio on topic Template Override Call custom fields
Just the value
Thanks
Thanks
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 11 months ago #64430
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Template Override Call custom fields
Please try
$fields = $this->form->getFields();
$fields->value.
Tat code should display the value of the custom field
Tuan
$fields = $this->form->getFields();
$fields->value.
Tat code should display the value of the custom field
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc, Giang Dinh Truong, Mr. Dam
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.