AnsweredAssumed Answered

about fieldToValidate

Question asked by Utku Alp on Nov 10, 2015
Latest reply on Nov 11, 2015 by Utku Alp

Hi everyone,

 

I have a question for 14.1 web interface.

On detail_pcat.htmpl , as you know ss_sym attribute is invisible if ss_include is unchecked. Similar to ss_sym I have one more attribute. It should also be invisible if ss_includes is unchecked.

I did the custumizations for the new field, copied from ss_sym the functionality is OK, but in edit mode fields are standing one under the other.

I've checked all the browsers so it isn't a browser issue.

 

What might be wrong?

P.S. ths s working on a 12.5 system

Untitled.png

 

Some part of customized codes is below

 

var ss_sym_fldNum;
var ss_sym_fld;

var ss_sym_fldNum_TR;
var ss_sym_fld_TR;

<PDM_MACRO name=dtlTextbox hdr="Self-Service Symbol" attr=ss_sym colspan=2 make_required=yes>
ss_sym_fldNum = _dtl.fieldToValidate.length - 1;
<PDM_MACRO NAME=dtlTextbox hdr="Self-Service Symbol_TR" attr="zss_sym_TR" colspan=2 make_required=yes>
ss_sym_fldNum_TR = _dtl.fieldToValidate.length - 1;

function ss_include_click ( select_obj ) 
{
     var ss_inc_val = select_obj.checked;
     if (ss_inc_val)
     {
          document.main_form.elements["SET.ss_include"].value = 1;
     }
     else 
     {
          document.main_form.elements["SET.ss_include"].value = 0;
     }


     // Find the ss_sym field 
     if ( typeof ss_sym_fld == "undefined" ) 
     {
          ss_sym_fld = findFieldAndLabelFromTable("ss_sym",1);
          ss_sym_fld_TR = findFieldAndLabelFromTable("zss_sym_TR",1);
     }

     if (ss_inc_val == 1) 
     {
          if ( ss_sym_fld != null ) 
          {
               _dtl.fieldToValidate[ss_sym_fldNum].is_required = 1;
               _dtl.fieldToValidate[ss_sym_fldNum_TR].is_required = 1;
               ss_sym_fld[0].style.display = "block";
               ss_sym_fld[1].style.display = "block";
               ss_sym_fld_TR[0].style.display = "block";
               ss_sym_fld_TR[1].style.display = "block";   
          }
     }
     else 
     {
          if ( ss_sym_fld != null ) 
          {
               _dtl.fieldToValidate[ss_sym_fldNum].is_required = 0;
               _dtl.fieldToValidate[ss_sym_fldNum_TR].is_required = 0;
               ss_sym_fld[0].style.display = "none";
               ss_sym_fld[1].style.display = "none";
               ss_sym_fld_TR[0].style.display = "none";
               ss_sym_fld_TR[1].style.display = "none";  
          }
     }
}

 

Regards,

Utku

Outcomes