cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

making attribute readonly in create wizard

588

For the category, we are auto generating the code. I need to display the code as read only in the create wizard ? readonly=true only works in the editor area. Can we achieve the same in the create wizard using some other attribute?

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Likes
 <context type="Product" component="configurableFlowDynamicForms">
         <df:dynamicForms modelProperty="newProduct">
             <df:attribute id="makeAttributeReadonlyInWizard"
                           qualifier="catalogVersion"
                           disabledIf="true"/>
         </df:dynamicForms>
     </context>

Something like that

arvind-kumar_avinash
Active Contributor
0 Likes

If you want to make it readOnly for all places, you can add the following custom property for this attribute

  <custom-properties>
      <property name="readOnlyForUI">
          <value>Boolean.TRUE</value>
      </property>
  </custom-properties>

Please check core-items.xml for some examples.

Alternatively, you can import the following ImpEx:

  INSERT_UPDATE AttributeDescriptor;qualifier[unique=true];enclosingType(code)[unique=true];readOnlyForUI 
  ;the-attribute-qualifier;the-itemtype;TRUE

Note: Change the-attribute-qualifier and the-itemtype with your attribute and itemtype.