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

Error when I use fields name with array #185

Open
harispepic opened this issue Jan 31, 2020 · 2 comments
Open

Error when I use fields name with array #185

harispepic opened this issue Jan 31, 2020 · 2 comments

Comments

@harispepic
Copy link

Hi, when I use field name with array I get this error

Bildschirmfoto 2020-01-31 um 09 58 34

This is the code im using:

<div class="form__row">
  <span class="radio form__radio">
    <input id="mrs" class="radio__input" type="radio" name="message[tenant][1][salutation]" value="Frau" required>
    <label class="radio__label" for="mrs">
      Frau
    </label>
  </span>

  <span class="radio form__radio">
    <input id="mr" class="radio__input" type="radio" name="message[tenant][1][salutation]" value="Herr" required>
    <label class="radio__label" for="mr">
      Herr
    </label>
  </span>
</div>

<div class="form__row">
  <div class="form__row">
    <div class="form__input">
      <label for="firstName">Vorname *</label>
      <input id="firstName" type="text" name="message[tenant][1][firstName]" required>
    </div>
    <div class="form__input">
      <label for="lastName">Nachname *</label>
      <input id="lastName" type="text" name="message[tenant][1][lastName]" required>
    </div>
  </div>
</div>
@RickKukiela
Copy link

RickKukiela commented Feb 13, 2020

Total shot in the dark here but what if you start the array at 0 instead of 1? If you cant get it working with the arrays you could always fall back to this: name="message[tenant_1_firstName]" etc.

@harispepic
Copy link
Author

Hi @RickKukiela, I already have fields which start with the array at 0.
I don't know if it's the right way but I fixed it with deleting the line from 214 - 218 🙄

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

2 participants