Include gsp fragments in html forms

htmlform
Tags: #<Tag:0x00007f73f5f6ccf8>
(Sameer Motwani) #1

Hi,

We have been facing problems in including the components created in UI commons module in the html forms. The current functionality of Ui Include is to just include the ui side of the component, but it doesn’t let us save the values selected as answer. We propose to create a new include fragment component using which we can reuse the ui commons components and save the values selected as observations.

Please let us know what the community thinks and we can get to work and push the changes.

Tagging @mksd @mogoodrich @mseaton @manek @mukesh

(Dimitri R) #2

@sameermotwani11 could you paste a little snippet here of how this would work?

(Mark Goodrich) #3

+1 to what @mksd said… would certainly be great to be able to include widgets from UI Commons for data entry of html forms, but, off the top of my head, this seems like it would be rather problematic/complexi to implement?

Take care, Mark

(Sameer Motwani) #4

We have been able to use the datepicker from the uicommons in the htmlforms.

<includeFragment
  fragmentId="field/datetimepicker"
  providers="uicommons"
  id="assessment_date"
  conceptId="197033"
  params="classes:form-control,required;formFieldName:assessment_date;endDate:today"/>

We have tested it extensively for datetimepicker till now and have been able to store the dates as observations.

(Mark Goodrich) #5

Pretty cool! I’m definitely interested in seeing the details and potentially incorporating them in when you are ready to share!

Take care, Mark

(Stephen Senkomago Musoke) #6

@sameermotwani11 Oh this is definitely very cool, looking forward to seeing how you approached this and playing with it too

(Mike Seaton) #7

@sameermotwani11 - did you do this using the “uiInclude” tag provided by the htmlformentryui module? Or another way?

(Sameer Motwani) #8

@mukesh @prateektiwari I would let them take over this thread.

(Mukesh Mukesh) #9

@mseaton We are not using “uiInclude” tag. We developed new tag ( “includeFragment”) .

1 Like
(Moses Mutesasira) #10

That sounds awesome :slightly_smiling_face:

(Stephen Senkomago Musoke) #11

@sameermotwani11 Can you share some sample code for the new includeFragment tag and how you are using it

1 Like