Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Crosswalk] Supporting Forms in html2md. #379

Open
jalagari opened this issue Jan 19, 2024 · 0 comments
Open

[Crosswalk] Supporting Forms in html2md. #379

jalagari opened this issue Jan 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jalagari
Copy link

jalagari commented Jan 19, 2024

Is your feature request related to a problem? Please describe.
When an HTML document contains a form element, the entire form is excluded in the output markdown. This applies to both crosswalk adaptive forms and sites with core form pages; in such instances, the form elements are ignored. The recommended and only approach is to utilize a converter, which acts as a wrapper over the AEM Server and leverages the Helix Importer.

Describe the solution you'd like

Forms in markdown can be represented either as inline content or references. However, the current EDS restricts JSON to a specific format and does not support hierarchical representation, as defined in the Adaptive Form based on the Form Headless Spec.

Approach: We propose handling JSON inline through the <pre> and <code> HTML tags. Instead of ignoring the form, the entire form JSON is stored within the HTML code tag, alongside 'pre.' To enhance flexibility, we have modified the Form block to read JSON from either the 'code' tag or anchor tag.

This approach has been successfully implemented in Cognizant Crosswalk. The end result markdown for the Contact Us form illustrates how this technique is applied. A similar approach is adopted for the upcoming 24petwatch forms.

Describe alternatives you've considered
If form is discovered in HTML then it will push the JSON by calling the Helix Admin API. More details in https://github.com/adobe/helix-admin/issues/1471

Additional context
Add any other context or screenshots about the feature request here.

@jalagari jalagari added the enhancement New feature or request label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant