Hexagon Geospatial
MENU

GeoMedia Smart Client

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Technical Evangelist
Posts: 4
Registered: ‎04-07-2017
Accepted Solution

FormElements with independent editable state/condition

[ Edited ]

Question

"How to define a FormElement with independent editable state/condition?"

Technical Evangelist
Posts: 4
Registered: ‎04-07-2017

Re: FormElements with independent editable state/condition

Answer

All FormElements (FormAction, FormField, FormGroup...) are inheriting the disabled-state of their parent-FormElements. But it is possible to declare FormElements with independent editable-states. 

 

Add a custom-script file to your form, bind a function to the 'form:before:ready' event and set a list with one or more FormElement-ids to the 'itemsWithIndependentEditableState' property.

 

 

Example

For example, if you want to define a read-only textfield with a clickable button as child-element.

 

FormSettings.xml

<Form name="form" customscript="customscript.js">
    <FormTab name="tab">
      <FormGroup name="group">
        <FormField name="textfield" editable="false">
          <FormAction name="button" editable="true"></FormAction>
        </FormField>
      </FormGroup>
    </FormTab>
</Form>

customscript.js

IG.vent.on('form:before:ready', function (form) {
    //These formitems don't inherit the editable states of their parents
    form.itemsWithIndependentEditableState = ['button'];
});

 

Highlighted
Contributor
Posts: 65
Registered: ‎11-20-2015

Re: FormElements with independent editable state/condition

Thanks

 

Wolfgang

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.