World is now on Opti ID! Learn more

Handling custom web-components from design-system with Optimizely-Forms

Vote:
 

We recently upgraded our system to use a design-system with custom web-components inherit from Angular-webComponent conversion. The imports seems to be working fine and the validation also, through some custom js from validation-listener, but some behaviors like setting focus on the first invalid element are brokens and we're looking for solution on that side.

Our first approach would be to completely override EPiServerForms.min.js so that we have full control on our side, and would also take advantage of this in order to switch to a more declarative based TS infrastucture for that part of Optimizely.

So knowing that, we're wondering : How can we completely override that JS or, would it be better to move to headless forms? We've just recently learned about this and are unsure if that would fit our needs better.

We are currently working on CMS v12, and nothing else would be headless. Is that even a possibility?

Thank you for helping us determine what would be the best approach.

#337924
Edited, Apr 24, 2025 15:46
Vote:
 

Moving to the new headless forms is the smart move. Some work for sure but you'll have full control. 

#337949
Apr 29, 2025 7:24
Vote:
 

Is it possible to move to the headless forms without moving the entire solution to headless forms? :O

#337975
Apr 30, 2025 15:04
Vote:
 

Sure, that is the idea. Simply install the Optimizely.Cms.Forms.Service package along with your existing Optimizely.Cms.Forms package

Set up headless Optimizely Forms API

 

#337976
Apr 30, 2025 16:20
Vote:
 

We're exploring this option at the moment. Just wondering if I'm forced to use the endpoints from the headless api or there's some service I can use since I'm directly inside the solution?

#338773
May 26, 2025 20:39
Vote:
 

As far as I know there's only the headless API and the service API that can be used. Can't really tell if the service API would be of any use to you since it's there to work with posted data.

https://docs.developers.optimizely.com/content-management-system/v1.2.0-forms/docs/using-forms-serviceapi

Shouldn't the headless API solve these issues anyway?

#338776
May 26, 2025 21:05
Vote:
 

Yeah, I'm just trying to optimize the solution at this point.

Moving to headless gives us 100% control over everything that's happening. But since we're already inside the CMS, and coding in cshtml everything that is headless related, I was wondering if there was a way to skip the headless api and directly use the controllers or services used by the headless API.

#338817
May 27, 2025 14:28
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.