Thanks for the awesome write-up! :)
Really helpful, cheers,
Daniel
On 19.04.2010, at 07:24, Gareth McCumskey wrote:
> So As I said before, I was going to do a blog post on this to sum up
> the entire thing. I have now finally done it if anyone is interested:
> http://www.synaq.com/news-release
So As I said before, I was going to do a blog post on this to sum up
the entire thing. I have now finally done it if anyone is interested:
http://www.synaq.com/news-releases/advanced-form-techniques-for-symfony
Thanks again to Sid for the help
On Tue, Feb 23, 2010 at 10:32 AM, Sid Bachtiar wrote
> and I know the names can cause some giggles but hey :P
LOL ... so ... any interesting website project lately? :P
Happy coding and bye for now.
On Tue, Feb 23, 2010 at 9:20 PM, Gareth McCumskey wrote:
> Well just to conclude this, I saw an example on one of the symfony
> docs about overwriting
I think this entire process will make an interesting blog post which
I'll do later today
On Tue, Feb 23, 2010 at 10:20 AM, Gareth McCumskey wrote:
> Well just to conclude this, I saw an example on one of the symfony
> docs about overwriting the formatRow method.
>
> Firstly, my big thanks to you
Well just to conclude this, I saw an example on one of the symfony
docs about overwriting the formatRow method.
Firstly, my big thanks to you Sid as I would not have gotten this far
without your help the community again has come to the rescue.
Now for anyone that may find this useful in futu
You attach your decorator class to your form, e.g.:
class yourForm extends sfForm
{
function configure()
{
/* configure your fields */
$decorator = new yourFormFormatter($this->widgetSchema);
$this->widgetSchema->addFormFormatter('custom', $decorator);
$this->widgetSchema->set
Just a question if I overwrite the formatRow method how do I
return the newly formatted row to wherever
eg
public function formatRow($label, $field, $errors = array(), $help =
'', $hiddenFields = null)
{
/*Do stuff to make $field from
into
*/
//Now what?
}
On Tue, Feb 23, 201
Actually I got very curious and did an experiment myself.Parameter
$field turns out to be a string like:
''
So I guess the solution would be a little bit hacky, involving some
regex to detect which field it is and give it a different format
(e.g.: add prefix on one field and append on the secon
If you look in sfWidgetFormSchemaFormatter class, you could probably
override method:
public function formatRow($label, $field, $errors = array(), $help =
'', $hiddenFields = null)
detect the special field through the $field parameter and give it a
different formatting.
On Tue, Feb 23, 2010 at 8
Oh I just understood why you can't do it LOL sorry
On Tue, Feb 23, 2010 at 8:20 PM, Sid Bachtiar wrote:
> Why can't you do something like this in template:
>
> renderRow(); ?>
>
> We are special:
>
> render(); ?>
> render(); ?>
>
>
> renderRow(); ?>
>
> On Tue, Feb 23, 2010 at 8:09 PM, Gareth
Why can't you do something like this in template:
renderRow(); ?>
We are special:
render(); ?>
render(); ?>
renderRow(); ?>
On Tue, Feb 23, 2010 at 8:09 PM, Gareth McCumskey wrote:
> All I really want to do is add a span around two widgets
> (). I cannot do this in the
> template because
All I really want to do is add a span around two widgets
(). I cannot do this in the
template because the template is designed to display many different
form types so the form class needs to define the exact structure of
the form.
On Tue, Feb 23, 2010 at 9:07 AM, Sid Bachtiar wrote:
> Don't know
Don't know about the documentation. I had to look around myself to
learn about it.
Take a look at this example from my blog:
http://bluehorn.co.nz/2009/08/31/symfony-12-sfform-formatter-to-add-stars-on-required-fields/
On Tue, Feb 23, 2010 at 7:57 PM, Gareth McCumskey wrote:
> Hi guys,
>
> I hav
Hi guys,
I have looked around for the documentation related to creating your
own form decorators but the reference to it in the forms book for
symfony 1.2 says look in Chapter 5 but there is no chapter 5 o.O
Any pointers to where I could find the info would be appreciated.
--
Gareth McCumskey
h
14 matches
Mail list logo