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

Carl Franks fireartist at gmail.com
Thu Oct 15 12:42:08 GMT 2009


2009/10/15 mohanprasad <mohan at thebizmo.com>:
>
> 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_fieldset: 1
> auto_id: '%f_%n'
> id: add_track
> load_config_file: __path_to(root,forms)__/track_info.yml
> elements:
> - type: Fieldset
>  add_attributes:
>    class: butt
>  elements:
>  - type: Submit
>    name: submit
>    value_loc: Save Track
>
> So i changed the auto_fieldset : 0 , then it worked fine.
>
> When i had a look at generated html codes in both cases, an empty fieldset
> is created in the case with auto_fieldset: 1, which is not the case when
> auto_fieldset: 0,
> As i was doing $form->get_element; its giving me the first fieldset which is
> empty, as a result formfu cant find position element not found.
> Thanks for your help.

Hi Mohan,

I'm glad you got it working.

If you're going to mix auto_fieldset(1) and adding explicit fieldsets,
you'll need to read the docs.

What's happening, is the explicit fieldset is being added directly to
the form, underneath the first fieldset added by auto_fieldset(1),
which will remain empty.

Carl



More information about the HTML-FormFu mailing list