- Posts: 448
- Thank you received: 2
support : pulling a custom field code
- sti
- Topic Author
- Offline
- Platinum Member
Hi
As i explained above, you can get the data of the custom fields by using:
HelperOspropertyFieldsPrint::showField($field,$row->id);
The $field is custom field object, in the $field, you have $field->field_type. This is the type of the custom field.
Field type can be : textbox, textarea, checkboxes, radio button v.v.
To process the field types, you can see in the administrator > components > com_osproperty > helpers > extrafields.php
Thanks
This is what u said in the first post, it doesnt look same..
Please Log in or Create an account to join the conversation.
- Mr. Dam
- Offline
- Administrator
- Posts: 12570
- Thank you received: 1627
They are the same
The $field object has several attributes
$field->id : id of custom field
$field->group_id : field group id
$field->field_type : field type of the custom field
$field->field_name : name of the custom field
v.v.
They are the attributes of the custom field table. We can support you in using the product, we can't tell you the purpose each line of the source code. You can edit the source code for satisfy you need. But you must have knowledge about php and joomla coding.
If you want to make any additional work outside the product description like making new layout v.v. You can ask us to do it for you. Of course with small additinal cost. It's fair for us.
Sincerely,
Ossolution
Please Log in or Create an account to join the conversation.
- sti
- Topic Author
- Offline
- Platinum Member
- Posts: 448
- Thank you received: 2
i did not ask for custom work to be done yet.
all i ask is for the code to pull the custom fields which is part of the template code.
Money can be earn anytime but not respect.
Please learn from the rest of the extension developers on the pride they cary in supporting their products.
Please Log in or Create an account to join the conversation.
- Mr. Dam
- Offline
- Administrator
- Posts: 12570
- Thank you received: 1627
First, if you want to show the custom field values in the your own template, you can see the sample code in the details.html.tpl.php
Line 556. We show the extra fields from the field groups.
<?php
if(count($row->extra_field_groups) > 0){
$extra_field_groups = $row->extra_field_groups;
for($i=0;$i<count($extra_field_groups);$i++){
$group = $extra_field_groups[$i];
$group_name = $group->group_name;
$fields = $group->fields;
?>
<!--
<div class="width-100 fltlft">
<fieldset class="adminform">
<legend><?php echo $group_name;?></legend>
</fieldset>
</div>
-->
<?php
?>
<table class="sTable fg" cellpadding="0" cellspacing="0">
<tr>
<td width="100%">
<div class="width-100 fltlft">
<fieldset class="adminform">
<legend><?php echo $group_name;?> <a href="javascript:showhideDiv('<?php echo $i?>');" id="fsb_<?php echo $i?>">[-]</a></legend>
<div id="fs_<?php echo $i?>" style="margin: 0 7px;display:block;">
<?php
//echo other information
if(count($fields)> 0){
echo '<table cellpadding="0" cellspacing="0" width="100%">';
for($j=0;$j<count($fields);$j++){
$field = $fields[$j];
if($field->displaytitle == 1){
?>
<tr>
<td class="left_details_col">
<?php echo $field->field_label;?>
</td>
<td class="right_details_col">
<?php echo str_replace("|",",",$field->uvalue);?>
</td>
</tr>
<?php
}else{
?>
<tr>
<td class="right_details_col">
<?php echo str_replace("|",",",$field->uvalue);?>
</td>
</tr>
<?php
}
}
echo '</table>';
}
?>
</fieldset>
</div>
</td>
</tr>
</table>
<?php
}
}
?>
You can copy that code to your template file. Of course, you need to understand to edit the source. If you have a bit knowledge about php. You can solve this problem easily.
Notice: if you don't know how php, you can't make the template for OS Property. Because the template of OS Property isn't only html.
Second, We always welcome the ideas from customer and other developer teams to improve OS Property. We also offer the best support to customers. We even help the customers to install the product and install sample data for customers if they can't do it.
Third, if the customer doesn't happy with the support services from our team. We are willing to refund and sorry the customer about the services quality of us.
Sincerely,
Ossolution
Please Log in or Create an account to join the conversation.
- 88clarkson
- Offline
- New Member
- Posts: 8
- Thank you received: 0
Just a simple question lead to 3 pages ..ROFLMAO
I was evaluating but i think i otherwise now.
Please improve your support .
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
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.