Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

[Notice] Array to string conversion in template form


Go to End


1356 Views

Avatar
Skullies

Community Member, 19 Posts

27 August 2016 at 1:18am

Good day
I have received a [Notice] Array to string conversion error when trying to change one of my input fields to a array. I believe that it is because I do not have it set to a variable.
this is a field that i am getting the ID of my items and this works.

 <input type="hidden" id="ID"  name="ItemID[]" value="$ID"class="form-control">

when i try to add this to the post I receive the notice.
<input type="number" id="Amount"  name="Amount[]" value="0" class="form-control">

If anyone has a idea of what i can do about this issue.
It would be much appreciated
Thanks
Skullies