Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27576

Wrap field edit form into a configurable custom element

    XMLWordPrintable

Details

    Description

      To enhance the content edit form, the markup dedicated to a field has to be wrapped by a custom element with 3 attributes:

      • fieldtype set with the Field Type identifier (ezstring, ezrelationlist, ...)
      • field-settings the JSON encoded field settings object
      • validator-configuration the JSON encoded validator configuration

      By default (for all Field Types, including third party ones), the <ez-field-edit> custom element should be used but depending on the field type, a specific custom element could be used.

      For instance:

      • for MapLocation, the custom element will be <ez-field-edit-maplocation>
      • for a third party field type called MyCompanyWhatever, it could be mycomp-edit-whatever

      So for instance, if a Content items has 4 fields, a Text Line, a custom field type, a Map Location and a MyCompanyWhatever, the edit form would look like:

      <form>
        <ez-field-edit fieldtype="ezstring" field-settings="{}" validator-configuration='{"StringLengthValidator":{"maxStringLength":20,"minStringLength":10}}'>
           <!-- markup for TextLine -->
        </ez-field-edit>
        <ez-field-edit fieldtype="customfieldtypeidentifier" field-settings="{}" validator-configuration="{}">
           <!-- markup for the custom field type identifier -->
        </ez-field-edit>
        <ez-field-edit-maplocation fieldtype="ezgmaplocation" field-settings="{}" validator-configuration="{}">
           <!-- markup for MapLocation -->
        </ez-field-edit>
        <mycomp-edit-whatever fieldtype="mycompwhatever" field-settings="{}" validator-configuration="{}">
           <!-- markup for MyCompanyWhatever -->
        </mycomp-edit-whatever>
      </form>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            damien.pobel-obsolete@ez.no Damien Pobel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: