admin-1506155825 Posted May 17, 2022 at 05:53 PM Share Posted May 17, 2022 at 05:53 PM This is about the implementation of conditional outputs based on custom fields in custom templates https://www.jreviews.com/docs/theme-resources/customize-layout-of-custom-fields#field-value-multiple-options In this case we are seeking to hide the inquiry form on a listing when it is marked sold. That is, the radiobutton field 'jr_listingstatus' has the option value 'soldout'. This is inserted directly into a custom template. However, neither the 'in_array'.... or '! in_array'.... if arguments work as expected. Ideas for the correct implementation? <?php if (! in_array('soldout', $CustomFields->fieldValue('jr_listingstatus',$listing))): ?> <h2 class="a-header-class" id="an-id"><span class="jrHeadingText"><?php __t("Title");?></span></h2> <?php $permission = $this->perm->__('listing')->setListing($listing); if ($permission->allowsInquiries() && $permission->canSendInquiry()) { echo $this->element("inquiry_widget"); } ?> <?php endif; ?> Link to comment
Alejandro Posted May 17, 2022 at 06:04 PM Share Posted May 17, 2022 at 06:04 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
admin-1506155825 Posted May 17, 2022 at 06:34 PM Author Share Posted May 17, 2022 at 06:34 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted May 17, 2022 at 08:05 PM Share Posted May 17, 2022 at 08:05 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
admin-1506155825 Posted May 18, 2022 at 07:54 AM Author Share Posted May 18, 2022 at 07:54 AM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Recommended Posts