joshua may wrote:
> Thanks for the update. I think I'd prett much figured this much out
> though, but it's good to hear it from you!
>
>>> (trying to work backward from the unit tests), and it seems to very
>>> much break the DRY style that I'm used to in symfony. I mean, it's not
>>> *difficult*, but I'm finding a lot of copy/paste of 'new
>>> sfStringValidator()' kind of deal (or whatever it is now - I haven't
>>> got the code open).
>> You must define the validation rules for each of your fields. I think it
>> makes sense... and this was the same with the validate/*.yml stuff, so I
>> don't see what is not DRY... By the way, there is still one missing
>> piece, the sfFormPropel class, which will do the ground work for you if
>> you want to create forms for your Propel objects.
>
> Hrm, I guess I've just been spoilt. I may be just speculating a bit,
> but I liked the validate/*.yml format because I knew where I could
> find validation rules (well, besides validateXxx). Now, I'd have to
> check the Form class, and possibly also somewhere within the action
> method (as opposed to a validateXxx() method). Not a big deal, but
> it's just going to be slightly more confusing, perhaps? Again though,
> I'll wait for docs before I start making these assumptions..
In fact, this is better now. You now have a single file to check, the
form class. In symfony 1.0, you have to check the .yml file and the
executeXXX() method.
>
>>> (As an aside, how to do I get sfForm to render with a submit button?
>>> Or do I do that manually? Hrm. I'll just wait for docs, I guess..!)
>> sfForm won't render a submit button for you, nor will it generates a
>> <form> tag for you.
>
> So should we literally write like '<input type="submit" />'? How will
> this fit with (what I've seen of) the "formatter"/"style" of the form
> (as in, the forms are currently generating <tr>...</tr>).
>
>>From what I can pick up (based on what's in SVN now), the view code
> will likely look something like:
> <form>
> <table>
> <?php echo $form ?>
> <tr><td colspan="2"><input type="submit" /></td></tr>
> </table>
> </form>
Right, this is the way it works:
<form action="<?php echo url_for('') ?>" method="post>
<table>
<?php echo $form ?>
<tr><td colspan="2"><input type="submit" /></td></tr>
</table>
</form>
>
> ..Maybe I'll just wait for you to release docs - will likely clear up
> my issues..!
>
> Thanks,
> Josh
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---