[Skip to main content](#vessel-content)

#   Deafault text field issue

##

- **[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")**
- [![deltafidesign's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4846.png)](/forum/user/4846-deltafidesign "View deltafidesign's Profile") Topic Author
- [ Offline](/forum/user/4846-deltafidesign)

Less More

- Posts: 272
- Thank you received: 13
-
-

14 years 11 months ago [\#32324](#32324) by [deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")  Replied by *[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")* on topic *[Re: Deafault text field issue](/forum/3-bug-report/31390-deafault-text-field-issue?start=20#32324 "I try to create a Default text field.  First of all I insert the default text in the text area and I save it. In the registration form it dispay all the text. I edit the field to choose number or rows and cols and then I save again. Now the text disappear both frontend and backend and if I try to insert again the text and then I save no text is shown.  A bug?")*

I'll build a test site, I'll let you know. thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zMTM5MC1kZWFmYXVsdC10ZXh0LWZpZWxkLWlzc3VlP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")**
- [![deltafidesign's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4846.png)](/forum/user/4846-deltafidesign "View deltafidesign's Profile") Topic Author
- [ Offline](/forum/user/4846-deltafidesign)

Less More

- Posts: 272
- Thank you received: 13
-
-

14 years 11 months ago [\#32569](#32569) by [deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")  Replied by *[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")* on topic *[Re: Deafault text field issue](/forum/3-bug-report/31390-deafault-text-field-issue?start=20#32569 "I try to create a Default text field.  First of all I insert the default text in the text area and I save it. In the registration form it dispay all the text. I edit the field to choose number or rows and cols and then I save again. Now the text disappear both frontend and backend and if I try to insert again the text and then I save no text is shown.  A bug?")*

This is the code of my field / form.php for my template:

&lt;?php
/**
* @package HikaShop for Joomla!
* @version 1.5.4
* @author hikashop.com
* @copyright (C) 2010-2011 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 [ www.gnu.org/licenses/gpl-3.0.html](http://www.gnu.org/licenses/gpl-3.0.html)
*/
defined('_JEXEC') or die('Restricted access');
?&gt;
&lt;div class="iframedoc" id="iframedoc"&gt;&lt;/div&gt;
&lt;form action="index.php?option=com_hikashop&amp;amp;ctrl=field" method="post" name="adminForm" &gt;
&lt;table cellspacing="1" width="100%"&gt;
&lt;tr&gt;
&lt;td width="50%" valign="top"&gt;
&lt;table class="paramlist admintable"&gt;
&lt;tr&gt;
&lt;td class="key"&gt;
&lt;label for="data[field][field_realname]"&gt;
&lt;?php echo JText::_( 'FIELD_LABEL' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type="text" name="data[field][field_realname]" id="name" class="inputbox" size="40" value="&lt;?php echo $this-&gt;escape(@$this-&gt;field-&gt;field_realname); ?&gt;" /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="key"&gt;
&lt;label for="data[field][field_table]"&gt;
&lt;?php echo JText::_( 'FIELD_TABLE' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php
if(hikashop_level(1) &amp;&amp; empty($this-&gt;field-&gt;field_id)){
echo $this-&gt;tabletype-&gt;display('data[field][field_table]',$this-&gt;field-&gt;field_table,true, 'onchange="setVisible(this.value);"');
}else{
echo $this-&gt;field-&gt;field_table.'&lt;input type="hidden" name="data[field][field_table]" value="'.$this-&gt;field-&gt;field_table.'" /&gt;';
} ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="columnname"&gt;
&lt;td class="key"&gt;
&lt;label for="data[field][field_namekey]"&gt;
&lt;?php echo JText::_( 'FIELD_COLUMN' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php if(empty($this-&gt;field-&gt;field_id)){?&gt;
&lt;input type="text" name="data[field][field_namekey]" id="namekey" class="inputbox" size="40" value="" /&gt;
&lt;?php }else { echo $this-&gt;field-&gt;field_namekey; } ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="key"&gt;
&lt;label for="data[field][field_type]"&gt;
&lt;?php echo JText::_( 'FIELD_TYPE' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php
if(!empty($this-&gt;field-&gt;field_type) &amp;&amp; $this-&gt;field-&gt;field_type=='customtext'){
echo $this-&gt;field-&gt;field_type.'&lt;input type="hidden" name="data[field][field_type]" value="'.$this-&gt;field-&gt;field_type.'" /&gt;';
}else{
echo $this-&gt;fieldtype-&gt;display('data[field][field_type]',@$this-&gt;field-&gt;field_type,@$this-&gt;field-&gt;field_table);
} ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="required"&gt;
&lt;td class="key"&gt;
&lt;label for="data[field][field_required]"&gt;
&lt;?php echo JText::_( 'REQUIRED' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php echo JHTML::_('select.booleanlist', "data[field][field_required]" , '',@$this-&gt;field-&gt;field_required); ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="required"&gt;
&lt;td class="key"&gt;
&lt;label for="field_options[errormessage]"&gt;
&lt;?php echo JText::_( 'FIELD_ERROR' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type="text" id="errormessage" size="80" name="field_options[errormessage]" value="&lt;?php echo $this-&gt;escape(@$this-&gt;field-&gt;field_options); ?&gt;"/&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="default"&gt;
&lt;td class="key"&gt;
&lt;label for="data[field][field_default]"&gt;
&lt;?php echo JText::_( 'FIELD_DEFAULT' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;display($this-&gt;field,@$this-&gt;field-&gt;field_default,'data[field][field_default]',false,'',true); ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="multivalues"&gt;
&lt;td class="key" valign="top"&gt;
&lt;label for="value"&gt;
&lt;?php echo JText::_( 'FIELD_VALUES' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;table&gt;
&lt;tbody id="tablevalues"&gt;
&lt;tr&gt;&lt;td&gt;&lt;?php echo JText::_('FIELD_VALUE')?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo JText::_('FIELD_TITLE'); ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo JText::_('FIELD_DISABLED'); ?&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;?php if(!empty($this-&gt;field-&gt;field_value) AND is_array($this-&gt;field-&gt;field_value) AND $this-&gt;field-&gt;field_type!='zone'){
foreach($this-&gt;field-&gt;field_value as $title =&gt; $value){
$no_selected = 'selected="selected"';
$yes_selected = '';
if((int)$value-&gt;disabled){
$no_selected = '';
$yes_selected = 'selected="selected"';
}
?&gt;
&lt;tr&gt;&lt;td&gt;&lt;input type="text" name="field_values[title][]" value="&lt;?php echo $this-&gt;escape($title); ?&gt;" /&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" name="field_values[value][]" value="&lt;?php echo $this-&gt;escape($value-&gt;value); ?&gt;" /&gt;&lt;/td&gt;
&lt;td&gt;&lt;select name="field_values[disabled][]" class="inputbox"&gt;
&lt;option &lt;?php echo $no_selected; ?&gt; value="0"&gt;&lt;?php echo JText::_('HIKASHOP_NO'); ?&gt;&lt;/option&gt;
&lt;option &lt;?php echo $yes_selected; ?&gt; value="1"&gt;&lt;?php echo JText::_('HIKASHOP_YES'); ?&gt;&lt;/option&gt;
&lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;?php } }?&gt;
&lt;tr&gt;&lt;td&gt;&lt;input type="text" name="field_values[title][]" value="" /&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" name="field_values[value][]" value="" /&gt;&lt;/td&gt;
&lt;td&gt;
&lt;select name="field_values[disabled][]" class="inputbox"&gt;
&lt;option selected="selected" value="0"&gt;&lt;?php echo JText::_('HIKASHOP_NO'); ?&gt;&lt;/option&gt;
&lt;option value="1"&gt;&lt;?php echo JText::_('HIKASHOP_YES'); ?&gt;&lt;/option&gt;
&lt;/select&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;a onclick="addLine();return false;" href='#' title="&lt;?php echo $this-&gt;escape(JText::_('FIELD_ADDVALUE')); ?&gt;"&gt;&lt;?php echo JText::_('FIELD_ADDVALUE'); ?&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="cols"&gt;
&lt;td class="key"&gt;
&lt;label for="field_options[cols]"&gt;
&lt;?php echo JText::_( 'FIELD_COLUMNS' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type="text" size="10" name="field_options[cols]" id="cols" class="inputbox" value="&lt;?php echo $this-&gt;escape(@$this-&gt;field-&gt;field_options); ?&gt;"/&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="filtering"&gt;
&lt;td class="key"&gt;
&lt;label for="field_options[filtering]"&gt;
&lt;?php echo JText::_( 'INPUT_FILTERING' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php
if(!isset($this-&gt;field-&gt;field_options)) $this-&gt;field-&gt;field_options = 1;
echo JHTML::_('select.booleanlist', "field_options[filtering]" , '',$this-&gt;field-&gt;field_options); ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="maxlength"&gt;
&lt;td class="key"&gt;
&lt;label for="field_options[maxlength]"&gt;
&lt;?php echo JText::_( 'MAXLENGTH' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type="text" size="10" name="field_options[maxlength]" id="cols" class="inputbox" value="&lt;?php echo (int)@$this-&gt;field-&gt;field_options; ?&gt;"/&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="rows"&gt;
&lt;td class="key"&gt;
&lt;label for="field_options[rows]"&gt;
&lt;?php echo JText::_( 'FIELD_ROWS' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type="text" size="10" name="field_options[rows]" id="rows" class="inputbox" value="&lt;?php echo $this-&gt;escape(@$this-&gt;field-&gt;field_options); ?&gt;"/&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="zone"&gt;
&lt;td class="key"&gt;
&lt;label for="field_options[zone_type]"&gt;
&lt;?php echo JText::_( 'FIELD_ZONE' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php echo $this-&gt;zoneType-&gt;display("field_options[zone_type]",@$this-&gt;field-&gt;field_options,true);?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="size"&gt;
&lt;td class="key"&gt;
&lt;label for="field_options"&gt;
&lt;?php echo JText::\_( 'FIELD\_SIZE' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type="text" id="size" size="10" name="field\_options" value="&lt;?php echo $this-&gt;escape(@$this-&gt;field-&gt;field\_options); ?&gt;"/&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="format"&gt;
&lt;td class="key"&gt;
&lt;label for="field\_options\[format\]"&gt;
&lt;?php echo JText::\_( 'FORMAT' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type="text" id="format" name="field\_options\[format\]" value="&lt;?php echo $this-&gt;escape(@$this-&gt;field-&gt;field\_options); ?&gt;"/&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="customtext"&gt;
&lt;td class="key"&gt;
&lt;label for="size"&gt;
&lt;?php echo JText::\_( 'CUSTOM\_TEXT' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;textarea cols="50" rows="10" name="fieldcustomtext"&gt;&lt;?php echo @$this-&gt;field-&gt;field\_options; ?&gt;&lt;/textarea&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;td valign="top"&gt;
&lt;table class="paramlist admintable"&gt;
&lt;tr&gt;
&lt;td class="key"&gt;
&lt;label for="data\[field\]\[field\_published\]"&gt;
&lt;?php echo JText::\_( 'HIKA\_PUBLISHED' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php echo JHTML::\_('select.booleanlist', "data\[field\]\[field\_published\]" , '',@$this-&gt;field-&gt;field\_published); ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="limit\_to"&gt;
&lt;td class="key"&gt;
&lt;label for="field\_options\[limit\_to\_parent\]"&gt;
&lt;?php echo JText::\_( 'DISPLAY\_LIMITED\_TO' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php
if(hikashop\_level(2)){
if(empty($this-&gt;field-&gt;field\_table)){
echo JText::\_( 'SAVE\_THE\_FIELD\_FIRST\_BEFORE' );
}else{
echo $this-&gt;limitParent-&gt;display("field\_options\[limit\_to\_parent\]",@$this-&gt;field-&gt;field\_options,$this-&gt;field-&gt;field\_table,@$this-&gt;field-&gt;field\_options);
}
}else{
echo '&lt;small style="color:red"&gt;'.JText::\_('ONLY\_FROM\_BUSINESS').'&lt;/small&gt;';
}
?&gt;
&lt;span id="parent\_value"&gt;&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php if(hikashop\_level(2) &amp;&amp; $this-&gt;field-&gt;field\_table=='entry'){ ?&gt;
&lt;tr class="product\_link"&gt;
&lt;td class="key"&gt;
&lt;label for="field\_options\[product\_id\]"&gt;
&lt;?php echo JText::\_( 'CORRESPOND\_TO\_PRODUCT' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;span id="product\_id" &gt;
&lt;?php echo (int)@$this-&gt;field-&gt;field\_options.' '.@$this-&gt;element-&gt;product\_name; ?&gt;
&lt;input type="hidden" name="field\_options\[product\_id\]" value="&lt;?php echo @$this-&gt;field-&gt;field\_options; ?&gt;" /&gt;
&lt;/span&gt;
&lt;a class="modal" rel="{handler: 'iframe', size: {x: 760, y: 480}}" href="&lt;?php echo hikashop\_completeLink("product&amp;task=selectrelated&amp;select\_type=field",true ); ?&gt;"&gt;
&lt;img src="&lt;?php echo HIKASHOP\_IMAGES; ?&gt;edit.png" alt="edit"/&gt;
&lt;/a&gt;
&lt;a href="#" onclick="document.getElementById('product\_id').innerHTML='&lt;input type=\\'hidden\\' name=\\'field\_options\[product\_id\]\\' value=\\'0\\' /&gt;';return false;" &gt;
&lt;img src="&lt;?php echo HIKASHOP\_IMAGES; ?&gt;delete.png" alt="delete"/&gt;
&lt;/a&gt;
&lt;br/&gt;
&lt;label for="field\_options\[product\_value\]"&gt;&lt;?php echo JText::\_( 'FOR\_THE\_VALUE' ).' '; ?&gt;&lt;/label&gt;
&lt;?php echo $this-&gt;fieldsClass-&gt;display($this-&gt;field,@$this-&gt;field-&gt;field\_options,'field\_options\[product\_value\]',false,'',true); ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php }?&gt;
&lt;tr&gt;
&lt;td class="key"&gt;
&lt;label for="data\[field\]\[field\_frontcomp\]"&gt;
&lt;?php echo JText::\_( 'DISPLAY\_FRONTCOMP' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php echo JHTML::\_('select.booleanlist', "data\[field\]\[field\_frontcomp\]" , '',@$this-&gt;field-&gt;field\_frontcomp); ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="key"&gt;
&lt;label for="data\[field\]\[field\_backend\]"&gt;
&lt;?php echo JText::\_( 'DISPLAY\_BACKEND\_FORM' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php echo JHTML::\_('select.booleanlist', "data\[field\]\[field\_backend\]" , '',@$this-&gt;field-&gt;field\_backend); ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="key"&gt;
&lt;label for="data\[field\]\[field\_backend\_listing\]"&gt;
&lt;?php echo JText::\_( 'DISPLAY\_BACKEND\_LISTING' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php echo JHTML::\_('select.booleanlist', "data\[field\]\[field\_backend\_listing\]" , '',@$this-&gt;field-&gt;field\_backend\_listing); ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;?php
if($this-&gt;field-&gt;field\_table=="product" \|\| $this-&gt;field-&gt;field\_table=="item" \|\| $this-&gt;field-&gt;field\_table=="category"){
$fieldsetDisplay="";
}else{
$fieldsetDisplay='style="display:none"';
}
?&gt;
&lt;fieldset &lt;?php echo $fieldsetDisplay; ?&gt; style="width:50%;" id="category\_field"&gt;
&lt;legend&gt;&lt;?php echo JText::\_( 'HIKA\_CATEGORIES' ); ?&gt;&lt;/legend&gt;
&lt;div style="text-align:right;"&gt;
&lt;a class="modal" rel="{handler: 'iframe', size: {x: 760, y: 480}}" href="&lt;?php echo hikashop\_completeLink("product&amp;task=selectcategory",true ); ?&gt;"&gt;
&lt;button type="button" onclick="return false"&gt;
&lt;img src="&lt;?php echo HIKASHOP\_IMAGES; ?&gt;add.png"/&gt;&lt;?php echo JText::\_('ADD');?&gt;
&lt;/button&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;br/&gt;
&lt;table class="adminlist" cellpadding="1" width="100%"&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th class="title"&gt;
&lt;?php echo JText::\_('HIKA\_NAME'); ?&gt;
&lt;/th&gt;
&lt;th class="title"&gt;
&lt;?php echo JText::\_('HIKA\_DELETE'); ?&gt;
&lt;/th&gt;
&lt;th class="title"&gt;
&lt;?php echo JText::\_('ID'); ?&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody id="category\_listing"&gt;
&lt;?php
if(!empty($this-&gt;categories)){
$k = 0;
for($i = 1,$a = count($this-&gt;categories)+1;$i&lt;$a;$i++){
$row =&amp; $this-&gt;categories\[$i\];
if(!empty($row-&gt;category\_id)){
?&gt;
&lt;tr id="category\_&lt;?php echo $row-&gt;category\_id;?&gt;"&gt;
&lt;td&gt;
&lt;div id="category\_&lt;?php echo $row-&gt;category\_id; ?&gt;\_id"&gt;
&lt;a href="&lt;?php echo hikashop\_completeLink('category&amp;task=edit&amp;cid='.$row-&gt;category\_id); ?&gt;"&gt;&lt;?php echo $row-&gt;category\_name; ?&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;td align="center"&gt;
&lt;a href="#" onclick="return deleteRow('category\_div\_&lt;?php echo $row-&gt;category\_id;?&gt;','category\[&lt;?php echo $row-&gt;category\_id;?&gt;\]','category\_&lt;?php echo $row-&gt;category\_id; ?&gt;');"&gt;
&lt;img src="../media/com\_hikashop/images/delete.png"/&gt;
&lt;/a&gt;
&lt;/td&gt;
&lt;td width="1%" align="center"&gt;
&lt;?php echo $row-&gt;category\_id; ?&gt;
&lt;div id="category\_div\_&lt;?php echo $row-&gt;category\_id;?&gt;"&gt;
&lt;input style="width: 50px; background-color:#e8f9db;" type ="hidden" name="category\[&lt;?php echo $row-&gt;category\_id;?&gt;\]" id="category\[&lt;?php echo $row-&gt;category\_id;?&gt;\]" value="&lt;?php echo $row-&gt;category\_id;?&gt;"/&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php
}
$k = 1-$k;
}
}
?&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br/&gt;
&lt;table class="paramlist admintable"&gt;
&lt;tr&gt;
&lt;td class="key"&gt;
&lt;label for="data\[field\]\[field\_with\_sub\_categories\]"&gt;
&lt;?php echo JText::\_( 'INCLUDING\_SUB\_CATEGORIES' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;?php echo JHTML::\_('select.booleanlist', "data\[field\]\[field\_with\_sub\_categories\]" , '',@$this-&gt;field-&gt;field\_with\_sub\_categories); ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/fieldset&gt;
&lt;legend&gt;&lt;?php echo JText::\_('ACCESS\_LEVEL'); ?&gt;&lt;/legend&gt;
&lt;?php
if(hikashop\_level(2)){
$acltype = hikashop\_get('type.acl');
echo $acltype-&gt;display('field\_access',@$this-&gt;field-&gt;field\_access,'field');
}else{
echo '&lt;small style="color:red"&gt;'.JText::\_('ONLY\_FROM\_BUSINESS').'&lt;/small&gt;';
} ?&gt;
&lt;/fieldset&gt;
&lt;?php if(!empty($this-&gt;field-&gt;field\_id)){ ?&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;fieldset&gt;
&lt;legend&gt;&lt;?php echo JText::\_('PREVIEW'); ?&gt;&lt;/legend&gt;
&lt;table class="admintable"&gt;&lt;tr&gt;&lt;td class="key"&gt;&lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($this-&gt;field); ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $this-&gt;fieldsClass-&gt;display($this-&gt;field,$this-&gt;field-&gt;field\_default,'data',false,'',true); ?&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/fieldset&gt;
&lt;?php } ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;?php
if(hikashop\_level(2) &amp;&amp; !empty($this-&gt;field-&gt;field\_id) &amp;&amp; in\_array($this-&gt;field-&gt;field\_type,array('radio','singledropdown','zone'))){
$this-&gt;fieldsClass-&gt;chart($this-&gt;field-&gt;field\_table,$this-&gt;field);
}?&gt;
&lt;div class="clr"&gt;&lt;/div&gt;
&lt;input type="hidden" name="cid\[\]" value="&lt;?php echo @$this-&gt;field-&gt;field\_id; ?&gt;" /&gt;
&lt;input type="hidden" name="option" value="com\_hikashop" /&gt;
&lt;input type="hidden" name="task" value="" /&gt;
&lt;input type="hidden" name="ctrl" value="field" /&gt;
&lt;?php echo JHTML::\_( 'form.token' ); ?&gt;
&lt;/form&gt;

&lt;?php echo "&lt;script type=\\"text/javascript\\"&gt;document.getElementById('16').readOnly = true;&lt;/script&gt;"; ?&gt;
&lt;?php echo "&lt;script type=\\"text/javascript\\"&gt;document.getElementById('19').readOnly = true;&lt;/script&gt;"; ?&gt;

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

As you can see I have put the Javascript code at the end of that file 2 times for 2 different textarea fields.

What's wrong? Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zMTM5MC1kZWFmYXVsdC10ZXh0LWZpZWxkLWlzc3VlP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

14 years 11 months ago [\#32596](#32596) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Deafault text field issue](/forum/3-bug-report/31390-deafault-text-field-issue?start=20#32596 "I try to create a Default text field.  First of all I insert the default text in the text area and I save it. In the registration form it dispay all the text. I edit the field to choose number or rows and cols and then I save again. Now the text disappear both frontend and backend and if I try to insert again the text and then I save no text is shown.  A bug?")*

That's the file "form" of the view "field". I was talking about the file "fields" of the view "checkout". So that's normal that it doesn't work ![:)](/media/kunena/emoticons/3.png ":)")

Also, the id should not be the id of the field in the database by the id of the HTML tag (which is the column name of your custom field).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zMTM5MC1kZWFmYXVsdC10ZXh0LWZpZWxkLWlzc3VlP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")**
- [![deltafidesign's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4846.png)](/forum/user/4846-deltafidesign "View deltafidesign's Profile") Topic Author
- [ Offline](/forum/user/4846-deltafidesign)

Less More

- Posts: 272
- Thank you received: 13
-
-

14 years 11 months ago [\#32603](#32603) by [deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")  Replied by *[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")* on topic *[Re: Deafault text field issue](/forum/3-bug-report/31390-deafault-text-field-issue?start=20#32603 "I try to create a Default text field.  First of all I insert the default text in the text area and I save it. In the registration form it dispay all the text. I edit the field to choose number or rows and cols and then I save again. Now the text disappear both frontend and backend and if I try to insert again the text and then I save no text is shown.  A bug?")*

Thanks! Now I can confirm that it works; this should be also done for the register view: what view/file?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zMTM5MC1kZWFmYXVsdC10ZXh0LWZpZWxkLWlzc3VlP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

14 years 11 months ago [\#32634](#32634) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Deafault text field issue](/forum/3-bug-report/31390-deafault-text-field-issue?start=20#32634 "I try to create a Default text field.  First of all I insert the default text in the text area and I save it. In the registration form it dispay all the text. I edit the field to choose number or rows and cols and then I save again. Now the text disappear both frontend and backend and if I try to insert again the text and then I save no text is shown.  A bug?")*

It's the file "custom_fields" of the view "user".

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zMTM5MC1kZWFmYXVsdC10ZXh0LWZpZWxkLWlzc3VlP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")**
- [![deltafidesign's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4846.png)](/forum/user/4846-deltafidesign "View deltafidesign's Profile") Topic Author
- [ Offline](/forum/user/4846-deltafidesign)

Less More

- Posts: 272
- Thank you received: 13
-
-

14 years 10 months ago [\#32689](#32689) by [deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")  Replied by *[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")* on topic *[Re: Deafault text field issue](/forum/3-bug-report/31390-deafault-text-field-issue?start=20#32689 "I try to create a Default text field.  First of all I insert the default text in the text area and I save it. In the registration form it dispay all the text. I edit the field to choose number or rows and cols and then I save again. Now the text disappear both frontend and backend and if I try to insert again the text and then I save no text is shown.  A bug?")*

Thanks, it works.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zMTM5MC1kZWFmYXVsdC10ZXh0LWZpZWxkLWlzc3VlP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")**
- [![deltafidesign's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4846.png)](/forum/user/4846-deltafidesign "View deltafidesign's Profile") Topic Author
- [ Offline](/forum/user/4846-deltafidesign)

Less More

- Posts: 272
- Thank you received: 13
-
-

14 years 8 months ago [\#40168](#40168) by [deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")  Replied by *[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")* on topic *[Re: Deafault text field issue](/forum/3-bug-report/31390-deafault-text-field-issue?start=20#40168 "I try to create a Default text field.  First of all I insert the default text in the text area and I save it. In the registration form it dispay all the text. I edit the field to choose number or rows and cols and then I save again. Now the text disappear both frontend and backend and if I try to insert again the text and then I save no text is shown.  A bug?")*

> nicolas wrote: Yes. We'll add that to the todo list.
>
> You could add the readonly to your custom field with a line of javascript at the end of that "fields" view file:
>
> &lt;?php echo "&lt;script type=\\"text/javascript\\"&gt;document.getElementById('TEXTAREA\_ID').readOnly = true;&lt;/script&gt;"; ?&gt;
>
> Of course, make sure that you replace TEXTAREA\_ID by the id of the textarea.

Any news about when this feature will be realesed? Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zMTM5MC1kZWFmYXVsdC10ZXh0LWZpZWxkLWlzc3VlP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

14 years 8 months ago [\#40357](#40357) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Deafault text field issue](/forum/3-bug-report/31390-deafault-text-field-issue?start=20#40357 "I try to create a Default text field.  First of all I insert the default text in the text area and I save it. In the registration form it dispay all the text. I edit the field to choose number or rows and cols and then I save again. Now the text disappear both frontend and backend and if I try to insert again the text and then I save no text is shown.  A bug?")*

It will be in next release.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zMTM5MC1kZWFmYXVsdC10ZXh0LWZpZWxkLWlzc3VlP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")**
- [![deltafidesign's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4846.png)](/forum/user/4846-deltafidesign "View deltafidesign's Profile") Topic Author
- [ Offline](/forum/user/4846-deltafidesign)

Less More

- Posts: 272
- Thank you received: 13
-
-

14 years 8 months ago [\#40360](#40360) by [deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")  Replied by *[deltafidesign](/forum/user/4846-deltafidesign "View deltafidesign's Profile")* on topic *[Re: Deafault text field issue](/forum/3-bug-report/31390-deafault-text-field-issue?start=20#40360 "I try to create a Default text field.  First of all I insert the default text in the text area and I save it. In the registration form it dispay all the text. I edit the field to choose number or rows and cols and then I save again. Now the text disappear both frontend and backend and if I try to insert again the text and then I save no text is shown.  A bug?")*

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zMTM5MC1kZWFmYXVsdC10ZXh0LWZpZWxkLWlzc3VlP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.079 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
