• Resolved joramantwi101

    (@joramantwi101)


    [msdyncrm_twig]
    {% form entity=”contact” name=”TEST” mode=”create” captcha=”true” hide_form=”true” %}
    {% endform %}
    [/msdyncrm_twig]

    <strong><select id="custom_test" name="custom_test" class="form-control" disabled="disabled" autocomplete="off"></select></strong>

    I had to move over to using twig template, but i’m now having an issue where some of my custom fields are being automatically disabled for some reason. These all have a datatype of either Choice or Choices on our D365 CRM.

    Also is there a way to customise the multiple choice field into checkboxes. having the user hold shift whilst clicking on the list view is not very user friendly

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author alexacrm

    (@alexacrm)

    @joramantwi101

    check if this column is not marked as readonly on the form and is enabled for create in metadata – these are the only situations when we mark a control as disabled.

    Also, that does not look like markup we generate – we definitely do not have <strong> element surrounding the control. Is it possible that someone modified the twig templates?

    That’s actually the answer to your second question ?? – modifying multi-select.twig file (in <plugin_dir>/templates/twig/form folder) would be the easiest way to modify generated code and generate checkboxes as required.

    HTH

    Thread Starter joramantwi101

    (@joramantwi101)

    Hi appreciate the quick response. And yes before coming to ask the question I ensured that the form/fields is not marked as readonly, this did work before when using [msdyncrm_form] but multi-select doesn’t work using this deprecated tag.

    I assume create mode is enabled as I wrote this in the short-code above –> form entity=”contact” name=”TEST” mode=”create”. Is there any other clear documentation/examples I can look into for twig forms?

    Ignore the tag the twig template was not edited, that just came from applying bold text and the code tag within this message field. Highlighting my issue of the form-control being set to disabled when readonly is not active and create is toggled on.

    And okay thanks I will explore modifying the multi-select.twig file for the checkbox options..

    Plugin Author alexacrm

    (@alexacrm)

    @joramantwi101 we would need to investigate why multi-select is rendered as disabled. If you want us to, we’d need admin access to your WordPress site, please contact us at [email protected] to arrange that.

    Thread Starter joramantwi101

    (@joramantwi101)

    Okay, will get in touch.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Twig Template – Disabling Field’ is closed to new replies.