OS Property support center

SOLVED - make 'Property Type' a required field ?

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 8 months ago - 11 years 8 months ago #18481 by kalesh.suby
Helo,

How to make Property Type under General info tab a required field ?
Last edit: 11 years 8 months ago by kalesh.suby.

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

  • Mr. Dam
  • Away
  • Administrator
  • Administrator
More
11 years 8 months ago #18483 by Mr. Dam
I am not sure you want to make the field "Property type" is mandatory in the frontend or backend.
From frontend :
Please open classes > listing.html.php
Function : function editListing($option,$row,$lists,$amenities,$amenitylists,$groups,$configs,$neighborhoods)
Find this code
<tr>
<td class="key">
<span class="hasTip" title="<?php echo JText::_('OS_PROPERTY_TYPE');?>::<?php echo JText::_('OS_PROPERTY_TYPE_EXPLAIN');?>">
<?php echo JText::_('OS_PROPERTY_TYPE')?>
</span>
</td>
<td>
<?php echo $lists; ?>
</td>
</tr>

And replace by
<tr>
<td class="key">
<span class="hasTip" title="<?php echo JText::_('OS_PROPERTY_TYPE');?>::<?php echo JText::_('OS_PROPERTY_TYPE_EXPLAIN');?>">
<?php echo JText::_('OS_PROPERTY_TYPE')?>
</span>
</td>
<td>
<?php echo $lists; ?><span class="required">(*)</span>
<?php
$require_field .= "pro_type,";
$require_label .= JText::_('OS_PROPERTY_TYPE').",";
?>
</td>
</tr>

Backend
file : classes > property.html.php
Function : editProperty($option,$row,$lists,$amenities,$amenitylists,$groups,$neighborhoods)
Find the code
<tr>
<td class="key">
<?php echo JText::_('OS_PROPERTY_TYPE')?>
</td>
<td>
<?php echo $lists; ?>
</td>
</td>
</tr>

And replace by
<tr>
<td class="key">
<?php echo JText::_('OS_PROPERTY_TYPE')?>
</td>
<td>
<?php echo $lists; ?><span class="required">(*)</span>
<?php
$require_field .= "pro_type,";
$require_label .= JText::_('OS_PROPERTY_TYPE').",";
?>
</td>
</td>
</tr>

Good luck!
Dam

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

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 8 months ago #18486 by kalesh.suby
Replied by kalesh.suby on topic Re: How to make 'Property Type' a required field ?
Hi Dam,

Obviously I want to make it required in front end when adding a property. This is why I said in general Info Tab.

Thanks for the reply - I will try it out.

Thanks

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

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 8 months ago #18491 by kalesh.suby
Replied by kalesh.suby on topic SOLVED - make 'Property Type' a required field ?
SOLVED. Thanks

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

  • Mr. Dam
  • Away
  • Administrator
  • Administrator
More
11 years 8 months ago #18551 by Mr. Dam

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

Moderators: Mr. DamNguyen Phu Quan