Skip to content

Implemented: design doc for DxpForm proposed component(#420)#422

Open
ymaheshwari1 wants to merge 3 commits into
hotwax:mainfrom
ymaheshwari1:#420
Open

Implemented: design doc for DxpForm proposed component(#420)#422
ymaheshwari1 wants to merge 3 commits into
hotwax:mainfrom
ymaheshwari1:#420

Conversation

@ymaheshwari1

Copy link
Copy Markdown
Contributor

Related Issues

#420

Short Description and Why It's Useful

Added basic documentation for DxpForm component and added its implementation details

Screenshots of Visual Changes before/after (If There Are Any)

Is the changes contains any breaking change?

If there are any breaking change include those in the release notes file

  • Yes
  • No

Contribution and Currently Important Rules Acceptance

Comment thread README.md

## DxpForm

This component handles creation and validation of the forms in the app. It hides the logic for form creation and validation from the developers and they can directly define the form elements and pass the schema in this component that renders a Ionic form to be used in the app.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This component handles creation and validation of the forms in the app. It hides the logic for form creation and validation from the developers and they can directly define the form elements and pass the schema in this component that renders a Ionic form to be used in the app.
This component handles creation and validation of the forms in the app. It abstracts the logic for form creation and validation from the developers and they can directly define the form elements and pass the schema in this component that renders a Ionic form to be used in the app.

Comment thread README.md

| Name | Description |
| --- | --- |
| submitForm | Trigged when the form is submitted by the user |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Focused, Blurred, Valid, Invalid and I think we can discuss a few more

Comment thread README.md
'required'
'email'
'number'
'mobile' (10–15 digits, optional +)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the user select from a list of mobile local validations?

@ymaheshwari1 ymaheshwari1 Aug 7, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now its not configurable, but will create a separate ticket to make it more configurable.

Comment thread README.md
{ type: 'minLength' | 'maxLength', value: number } (for strings)


All the elements will be displayed in ion-list wrapped by ion-item.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
All the elements will be displayed in ion-list wrapped by ion-item.
All the elements will be displayed in ion-items wrapped by ion-list.

Comment thread README.md

```html
<template>
<DxpForm :schema="{}" :fabSaveButton="true" :blockSaveButton="false" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the save button should only have one option, use the default or provide a custom button. field is something like:

saveButtonId: ""

In this the user passes the element id of their save button where the action is attached. Internally the component should go to that button and add the form id to that button during code compile

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dt2patel Sir, as discussed, I am exploring on this and it seems like fab-button does not work like a normal button with form.

An ion-fab-button cannot be directly bound to a form for submission in the same way a standard ion-button with type="submit" can. This is because the ion-fab-button component lacks the internal logic to handle form submissions, which is present in ion-button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants