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

Document [] isAutoincrement syntax for names. #45

Open
KES777 opened this issue Jan 23, 2025 · 0 comments
Open

Document [] isAutoincrement syntax for names. #45

KES777 opened this issue Jan 23, 2025 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@KES777
Copy link

KES777 commented Jan 23, 2025

Describe the bug
This is actually not a bug, but a lack of documentation. During debug session I found that [] is the special syntax used by the library.

In my code I had:

%= hidden_field 'Company[Email][][id]' => ''
%= form_field  input => 'Email', 'Company[Email][][email]',

Image

I resolved my problem just by replacing [] to [X]. The debug session below is just for information purposes.

Debug session

Image

Image

Image

Image

Image

During debugging I found that library supports [] isAutoincrement. But I did not find any documentation. Though I can see only one example without explanation here https://brainfoolong.github.io/form-data-json/

Image
But it is for <select> and it is not clear how it works for the array of inputs.

@KES777 KES777 added the bug Something isn't working label Jan 23, 2025
@brainfoolong brainfoolong added documentation Improvements or additions to documentation and removed bug Something isn't working labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants