Re: [html-formfu] position element not found

2012-01-17 Thread Gabor HALASZ
On 1/10/2012 7:48 PM, Gabor HALASZ wrote: $position = $c->stash->{form}->get_all_element({ type => 'File', }); $position->parent->insert_after( $c->stash->{form}->element( { name => $productId, src => $c->uri_for( '/api/getproducticon/' . $productId ), type => 'Image', } ), $position ); Any id

Re: [html-formfu] position element not found

2012-01-10 Thread Gabor HALASZ
On 1/10/2012 10:56 AM, Carl Franks wrote: Ah, it's the old FAQ :) - you need to call insert_after() on the parent of $position, not the $form object. So, do this: $position->parent->insert_after( \%new_spec, $position ); Hi! I tried this, but not works perfectly, the new element render

Re: [html-formfu] position element not found

2012-01-10 Thread Gabor HALASZ
On 1/10/2012 12:15 PM, Carl Franks wrote: On 10 January 2012 10:22, Gabor HALASZ wrote: Thanks :) My last question today: I created a simple element/constraint pair for my app to protect form's hidden fields (with sha1 checksum) from malicious users. What do you think, its maybe interesting to

Re: [html-formfu] position element not found

2012-01-10 Thread Carl Franks
On 10 January 2012 10:22, Gabor HALASZ wrote: > Thanks :) My last question today: I created a simple element/constraint pair > for my app to protect form's hidden fields (with sha1 checksum) from > malicious users. What do you think, its maybe interesting to publish? Sounds interesting - similar

Re: [html-formfu] position element not found

2012-01-10 Thread Gabor HALASZ
On 1/10/2012 10:56 AM, Carl Franks wrote: On 10 January 2012 09:16, Gabor HALASZ wrote: On 1/10/2012 9:38 AM, Carl Franks wrote: Hi, Can you provide the config / code which sets-up the form, and the rest of your code which looks like it's cut off mid-line? Hi! My configs: picture/manage

Re: [html-formfu] position element not found

2012-01-10 Thread Carl Franks
On 10 January 2012 09:16, Gabor HALASZ wrote: > On 1/10/2012 9:38 AM, Carl Franks wrote: >> >> Hi, >> Can you provide the config / code which sets-up the form,  and the rest >> of your code which looks like it's cut off mid-line? > > > Hi! > > My configs: > > picture/manage.conf: > > <> > >    ty

Re: [html-formfu] position element not found

2012-01-10 Thread Gabor HALASZ
On 1/10/2012 9:38 AM, Carl Franks wrote: Hi, Can you provide the config / code which sets-up the form, and the rest of your code which looks like it's cut off mid-line? Hi! My configs: picture/manage.conf: <> typeBlock id fieldb

Re: [html-formfu] position element not found

2012-01-10 Thread Carl Franks
Hi, Can you provide the config / code which sets-up the form, and the rest of your code which looks like it's cut off mid-line? Cheers, Carl On Jan 9, 2012 6:20 PM, "Gabor HALASZ" wrote: > Hi! > > I tried to add elements to my form (new elements into a fieldset element), > but I got exception wi

[html-formfu] position element not found

2012-01-09 Thread Gabor HALASZ
Hi! I tried to add elements to my form (new elements into a fieldset element), but I got exception with $subject. My code is: my $position = $c->stash->{form}->get_all_element({ type => 'File', }); # my $position = $c->stash->{form}->get_all_element; use Data::Dumper; $c->log->debug( 'HIER: '

Re: [html-formfu] position element not found error when using insert_before

2009-10-15 Thread Carl Franks
2009/10/15 mohanprasad : > > Hi Carl, > Thanks for your reply. > I updated the things as you suggested. > Even after that it was giving me the same error. > Now its my mistake, actually the yml form data i provided in my previous > message is wrapped by another yml form. > that yml form data is as

Re: [html-formfu] position element not found error when using insert_before

2009-10-15 Thread mohanprasad
Hi Carl, Thanks for your reply. I updated the things as you suggested. Even after that it was giving me the same error. Now its my mistake, actually the yml form data i provided in my previous message is wrapped by another yml form. that yml form data is as follows. action: /add/track/data auto_fi

Re: [html-formfu] position element not found error when using insert_before

2009-10-15 Thread Carl Franks
2009/10/15 mohanprasad : > > Hi, > > I am trying to insert a new element in my catalyst controller action using > below code. > i have two hidden fileds, one text box, i am trying to insert the new > element before hidden fields. > > my $form = $self->form; > my $file = "restricted/add/product"; >

[html-formfu] position element not found error when using insert_before

2009-10-15 Thread mohanprasad
Hi, I am trying to insert a new element in my catalyst controller action using below code. i have two hidden fileds, one text box, i am trying to insert the new element before hidden fields. my $form = $self->form; my $file = "restricted/add/product"; $form->load_config_filestem($file); $form->p