Triggering action in cs widget on validation

The collapsible headings that already exist in Liberty Create have pretty limited usage as they can only collapse elements in the same widget. I have made a custom widget which allows the user to collapse multiple widgets by collapsing the contents of the next page cell.

The widget may need a bit of tweaking to handle all cases, but for the moment it’s working well enough for the use cases that I created it for, except for one key issue: validation

For the built in collapsible headings in Liberty Create, when the user submits the page, if validation is triggered on fields inside a collapsible heading, the heading will expand so that the user can see the issue. For my widget this does not happen, so it can appear that the user’s progress is being halted for no reason. This means that it’s essentially unusable for modification (as opposed to display) purposes.

Can anyone think of a way to get around this? I tried to make the way that the widget works as close to the built-in functionality as possible in the hope that this might just resolve automatically, but no luck so far and I’m not sure what else to try. I can’t add a fragment validator to a code studio widget.

Seems I can’t attach the widget zip to this post, so to give a brief description of what it’s doing:

It’s a div with an on-click event which will “collapse” the next page cell by finding the cell and applying the following classes to every child of class “.row” within that page cell:

  • hide
  • hidden_collapse

Happy to share the widget itself if there’s a way to do so, but I don’t think it would be ready for AppShare

1 Like

Hi Dylan
Please feel free to submit it to AppShare and I’ll get the guys with propellers on their heads to take a look. Don’t worry, it won’t just appear in public!
Cheers, Tony

Thanks Tony, this has now been submitted.

I never got a response to this. Did anyone get a chance to take a look?