I would create a custom form class that extends from sfForm (sfFormCRM for
example) and put there all the saving logic of the form. Then it would be a
nice idea to have a BaseFormCRM that inherits from your sfFormCRM to have a
place to put common application logic between your CRM forms without
touching your sfFormCRM (or you could just put on sfFormCRM everything. But
I would separate just in case). Finally, you could extend that form to
create your own CRM forms.

On Fri, Aug 20, 2010 at 1:55 AM, bretth <brett...@gmail.com> wrote:

> Hi,
>
> I have made a custom form which extends sfForm. The responses from the
> form are to be stored in a third party CRM database via a web service;
> they have no connection to the local database or an object in
> schema.yml.
>
> I need to send those values through when the form is saved and valid;
> but since I'm using sfForm instead of sfFormDoctrine which extends
> sfFormObject, I don't have doSave() etc.
>
> Can I get some suggestions for the best way to do this? Where should
> the code that posts the values through go in? I could put it in the
> action itself, but I would prefer it more attached to the form itself.
> The other thing I thought of was to use a callback postvalidator and
> put it in there. I guess I could override bind() and put it there, but
> to me that doesn't really seem like the most appropriate place for it;
> I would say that bind is for binding values, not for saving or
> anything like that.
>
> Does anyone have any suggestions about the best way for me to do this?
>
> thanks
>
> Brett
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to