Replies: 1 comment 7 replies
-
@awset we recently added a feature to add custom inputs from outside the core set in ripple-ui-forms, but honestly didn't consider the case where you'd want to override an existing one. At the moment it works just by adding the input to its own formkit plugin, and combining them on I think this can be done, but we would need to scope it and add it to the backlog (actually great timing, because we do have some bigger form work in the pipeline). Not sure if this is relevant, but you could look at how the kinder calculator was rebuilt for some ideas on using our core date input - this one uses the combined date from the control and parses it back into a date object to manipulate the parts: https://github.com/dpc-sdp/ripple-vic-gov-au-custom/blob/main/layers/kinder-calculator/components/global/VicKinderCalculator.vue |
Beta Was this translation helpful? Give feedback.
-
Hi Ripple Team,
I have a use case that requires rendering the text field and text area differently to enhance the user experience. Currently, I have a DOB field using a text field and a Preferred Contact Time field using a text area.
For the DOB, I need to capture the date, month, and year in separate fields, apply custom validation, and then construct the date string into the text field.
For the Preferred Contact Time, I need a set of fields to capture specific times of day from Monday to Friday. These fields will populate the text area with line breaks separating the times.
This approach will help us uniformly capture the data format from users.
Here is the final image we are aiming for:
I have implemented this in Ripple1 by patching the webform mapping and assigning a custom component when the field has a custom class set in the Webform configuration. However, in Ripple2, I can't simply override the component.
Currently, Ripple2 uses
RplFormText
, mapped to the RplFormInput component. I am unable to override theRplFormInput
in my custom layers or modules as I did withTideContentPage
, like this:I tried overriding the
RplForm.vue
, but it led to a complex process involving copying plugin files and other unrelated files, which still resulted in issues.What is the best way to achieve this? I am looking for a solution similar to this PR in Ripple1: https://github.com/dpc-sdp/legalaid-vic-gov-au/pull/254
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions