can you show us the whole thing.
The form and the Formit-call?
-
☆ A M B ☆
- 24,524 Posts
All setValue is doing is setting the value of a given existing field. There doesn't appear to be an API function for creating new fields. You'll need to access the fields array directly:
$hook->fields[$key] = $value;
Thanks both for the replies. I've actually managed to get it working. Not 100% what it was as I made a few changes. But the form and call were in a chunk that was being pulled in via a contentBlocks chunk fields.
I've changed this and placed the chunk directly into the resource which seems to work and some times not. I'm now calling that chunk unchached which so far seems to being working as expected.
Thanks again.