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

Is it possible to have a hidden field or a display field? #139

Closed
wyxcoder opened this issue Sep 20, 2019 · 2 comments
Closed

Is it possible to have a hidden field or a display field? #139

wyxcoder opened this issue Sep 20, 2019 · 2 comments

Comments

@wyxcoder
Copy link

I want to show a Total somewhere, for example, I have two Select and a summary to show the total of the two selected value, like

horizontalSelect 1 (attribute:a) => 20
horizontalSelect 2 (attribute:b) => 30
The total is 50

How can I have a widget to show the three line, the ideal way is have a third form field with attribute c and value set to 50, so when I submt, I can submit value like
{ "a":20, "b":30", "c":50}

Thanks

@danvick
Copy link
Collaborator

danvick commented Oct 22, 2019

Hi @wyxcoder,
You could build your own custom FormBuilderField for this scenario.
Kindly refer here on how to construct a custom field

@atiqsamtia
Copy link

The Easy way would be to add a TextField with readOnly flag to true.

FormBuilderTextField(
            readOnly: true,
            attribute: "c",
            decoration: InputDecoration(labelText: "Total"),
          ),

@danvick danvick closed this as completed May 7, 2020
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

No branches or pull requests

3 participants