eZ Community » Forums » Setup & design » Attributs for dynamic forms input

Attributs for dynamic forms input

Attributs for dynamic forms input

Thursday 30 October 2014 6:56:04 pm - 5 replies


I'm building a new object (let's name it MyCustomForm ) and I'm setting all his attributes from the Back Office, no problems for that, but I'm looking for a way to have a dynamic form, a bit like we can have with the "Option" attribute. With this attribute, as you know, you can add as many option as you want in your "select" input.

The goal is to permit to build custom forms containing as many input field (input text) as an Editor want. ( Editor will be in charge to build the forms from the Front Office when he create a MyCustomForm object ).

I'm looking for a component (?) that can extend my attribut list with this kind of attribut. Does it exist somewhere or do I have to build one myself ?

Thanks for your help.


Thursday 30 October 2014 10:21:04 pm

Hello Peretjatko,

The answer here is fairly simple. Your really at the heart of this issue thinking about the functionality in the wrong way.

What you need is to create content class variations for the forms you wish to create instead of looking for a custom attribute ezxmltext based datatype (which supports information collection -and- unlimited overloaded uses) which does not (and prolly should not) exist.

So when they want a variation of a form create a copy of the existing form in the class editor and modify the form class to be unique and contain the attributes desired.

In short the functionality you require does exist, but you have to look at it from a different perspective (one form class vs several unique form classes).

I hope this helps ...


Modified on Thursday 30 October 2014 10:22:26 pm by // Heath

Friday 31 October 2014 8:41:52 am

Take a look at http://projects.ez.no/optionmatrix - I wrote that extension for exactly that purpose - dynamic forms.

Friday 31 October 2014 12:20:39 pm

@Steven : Yes I have seen your extension (it's the one I mentioned when I speak about "Option"blunk.gif Emoticon but I had to extend or rewrite it because it give Radio, Checkbox and Dropdown inputs. That great but I need "Text".

@Heath : Do you mean that I have to create all the variations of my form ? I can't do that because the possibility are infinite. I think I didn't define correctly my problem ( sorry for that ). I don't want admins to go in the class editor. For me the best solution is something around the optionmatrix datatype Steven spoke about.


Saturday 01 November 2014 4:36:59 pm

@Peretjatko it shouldn't be that hard to add an attribute type.  I remember that there are only a few places where you have to add the something... the only thing that I can think that might be a problem is that it's stored as xml and if your text field is also xml you'll have to wrap that with a CDATA I guess - could get ugly fast.

If you do get around to doing, it then pass me the code and I'll incorporate it into the project.

Friday 14 November 2014 4:35:21 pm

At this time I've just update templates to propose "input fields" in the back office and that's work fine !

Now my problem is to recover the fields from my forms, I'm looking for something in collected information, but I can't find nothing in the  appropriate admin section. All other informations ares well stored from my forms ( like static text attribute defined as "information collector"blunk.gif Emoticon but nothing about the optionmatrix (defined as "information collector" as well).

Is there any settings I've missed ?


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from