Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fieldset + Legend #15

Closed
lionel-m opened this issue Dec 18, 2012 · 18 comments
Closed

Fieldset + Legend #15

lionel-m opened this issue Dec 18, 2012 · 18 comments

Comments

@lionel-m
Copy link

Hi,

I would like to add a fieldset and a legend.

<fieldset><legend><b><?php echo $this->fieldset_legend; ?></b></legend>

...

</fieldset>

There is this function but... $objForm->addFieldSet('year');

Is there a solution with Haste ?

@qzminski
Copy link
Member

@Toflar, do you know the answer for this question?

@Toflar
Copy link
Collaborator

Toflar commented Dec 19, 2012

Yes I know the answer: It's not possible yet :-) We'd have to add it. I don't like the way fieldsets are handled anyway.
But I've created a simple solution that could also be added in the 1.x version because it's fully backward compatible. For version 2 I'd like to have a proper solution though.
@lionel-m does that work for you?

https://github.com/qzminski/Haste/tree/feature/legends

@lionel-m
Copy link
Author

does that work for you?

Yes thanks !

@Toflar Toflar reopened this Dec 19, 2012
@Toflar
Copy link
Collaborator

Toflar commented Dec 19, 2012

Merge this feature into develop for a future 1.1.0

@qzminski
Copy link
Member

qzminski commented Apr 9, 2013

Is this feature ready to be merged?

@Toflar
Copy link
Collaborator

Toflar commented Apr 9, 2013

It's not really nicely done but it apparently yes

@qzminski
Copy link
Member

qzminski commented May 4, 2013

Merged in e8e2d4f

@qzminski qzminski closed this as completed May 4, 2013
@aschempp
Copy link
Collaborator

aschempp commented May 4, 2013

I dont think this will work, has anyone tested it? E.g. the exception in addFieldSet will never wprk this way?

@aschempp aschempp reopened this May 4, 2013
@qzminski
Copy link
Member

qzminski commented May 4, 2013

This has not been tested. Why the exception wouldn't work?

@aschempp
Copy link
Collaborator

aschempp commented May 4, 2013

Because in_array would never match a name, if the name now in a key of the array?

@qzminski
Copy link
Member

qzminski commented May 4, 2013

Haha right, gonna fix that ;-)

qzminski added a commit that referenced this issue May 4, 2013
@aschempp
Copy link
Collaborator

aschempp commented May 4, 2013

I'm not sure if thats all, the "name" key seems not used in any changed code lines, but I havent checked everything on my ipad ;-)

@Toflar
Copy link
Collaborator

Toflar commented Aug 20, 2013

I'm gonna rewrite this part for 2.0 anyway^^

@Toflar Toflar closed this as completed Aug 20, 2013
@sabrik
Copy link

sabrik commented Sep 11, 2014

Hey guys,

Is it possible to use fieldsets with the latest version when you integrate the fields from an array with the $objForm->addFormFields function?

Thanks

@Toflar
Copy link
Collaborator

Toflar commented Sep 11, 2014

I don't really get your question, but if you wanted to ask whether the latest version supports fieldsets, then yes. Just use the inputType "fieldset".

@sabrik
Copy link

sabrik commented Sep 11, 2014

Thanks for the fast reply! :-)
Already tried that but it does not work.
Can you give me an example how it should work, or what the dca element has to look like?

I tried it with:

        'fieldset' => array
        (
            'name'          => 'fieldset1',
            'label'         => 'label',
            'inputType'     => 'fieldset'
        ),

@Toflar
Copy link
Collaborator

Toflar commented Sep 11, 2014

$arrFields['fieldset_start'] = array (
    'inputType' => 'fieldset',
    'eval'      => array('fsType'=>'fsStart')
);
$arrFields['fieldset_end'] = array (
    'inputType' => 'fieldset',
    'eval'      => array('fsType'=>'fsEnd')
);

@sabrik
Copy link

sabrik commented Sep 11, 2014

Oh of course, fsType!
Thanks for your help Toflar :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants