Please post all pre-sales questions of all products on this forum

Template Override Call custom fields

  • Claudio
  • Topic Author
  • Offline
  • New Member
  • New Member
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

Please Log in or Create an account to join the conversation.

More
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 Log in or Create an account to join the conversation.

  • Claudio
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 11 months ago #64419 by Claudio
Replied by Claudio on topic Template Override Call custom fields
Just the value

Thanks

Please Log in or Create an account to join the conversation.

More
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

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham NgocGiang Dinh TruongMr. Dam