Customer Portal

Get Involved. Join the Conversation.

Topic

    lbriggs
    Dynamic forms
    Topic posted April 9, 2019 by lbriggs Bronze Medal: 1,250+ Points 
    27 Views, 1 Comment
    Title:
    Dynamic forms
    Summary:
    Multi subjects needing the same fields to be displayed.
    Content:

    I am work to change our ask a question page to be dynamic based on the selection that the user made from our subject tree.  We have a large subject tree for the user to select from and they are required to select from level 2 but can select from level 3 as well but are not required to.  So based on what the user select we will display the fields that they need to fill in. Since multi subject will have the same fields to display. My question is can we list out multi ids for one grouping or do I have to list each individual ids.

    example individual ids        show_fields_for_ids="919:Incident.CustomFields.c.travel_date, Incident.CustomFields.c.traveler_last_name | 920:Incident.CustomFields.c.travel_date, Incident.CustomFields.c.traveler_last_name | 921:Incident.CustomFields.c.travel_date, Incident.CustomFields.c.traveler_last_name"

    or can I combine these multi ids some how into one, is there a delimiter that can be used? 

    show_fields_for_ids="919 | 920 | 921 :Incident.CustomFields.c.travel_date, Incident.CustomFields.c.traveler_last_name"

     

    Version:
    May 18 or 18B

    Comment

     

    • Daniel Rocha

      You have to create a custom widget that will listen to the selection of the subject and then check if the input should be displayed or not.

      If you are using the standard/input/ProductCategoryInput, you can listen to the event evt_productCategorySelected that it fires.