Great suggestion!
I actually found the answer yesterday... although I'm not sure if it's
good practice, I just had to add an else condition in my
saveEmbeddedForms() method to set the relationship with the main
object, instead of forcing the relationship from the beginning.
This is the updated co
I think that easy solution is to overwrite the save method of the
object wich is on the embeded form.
Just test if there are some values and if not, end the method. If yes,
call parent::save()
On 30 čnc, 01:51, J_Wesker wrote:
> After making some changes on my code and debugging using die's and
After making some changes on my code and debugging using die's and
var_dump() all day,
I haven't found the cause of all this. But I have make sure of some
facts:
1. If I embed directly the comment form, and set the body field as
required, then both objects get saved smoothly,
unfortunately the bus
Sorry, my mistake. I thought the "getValue" method returned false instead of
null. What I don't see is the validator set on the Expense form. Set it as
the PostValidator
On Thu, Jul 29, 2010 at 3:03 PM, J_Wesker wrote:
> Why would it be always false?
>
> In the validator I'm unsetting the comm
Why would it be always false?
In the validator I'm unsetting the comment reference if body field has
no value...
wrote:
> Sorry, the last line I was talking about is:
>
> *if** (**!**isset**(**$comment**))
> {
> **unset**(**$forms**[**'**comment**'**]);
>
> }
>
> The if condition would be al