Forums | Mahara Community

Developers /
Pieforms extenable?


Yannick L's profile picture
Posts: 5

23 June 2009, 10:38 AM

Hey there folks,

I was wondering if there is a way to extend the pieforms with my own elements. I want to add an default avatar selection box but there is no way to add some plain HTML between fields by default. Now I was looking for some documentation on the pieforms but it isn't much.

Any tips on how to do this *whitout* changing the code and keeping it within the artefact folder?

 

Greets,

Yannick

Nigel's profile picture
Posts: 1643

23 June 2009, 5:47 PM

Hi - for pieforms documentation, you can check out pieforms from SVN at sourceforge. I've written some which is there, though it's not complete.

You can add new pieform elements without too much trouble. See the 'viewacl' element, which provides basically the entire View Access screen (not that it's a good screen, but it does show the use of a custom pieform element). You can drop them into lib/form/elements. They can even use smarty to lay out their information, again see the viewacl element for an example.

I think from Mahara 1.2, Richard added the ability for artefacts to include their own pieform elements, and the 'file' artefact includes one for managing file attachments. So for now you could put your element in lib/form, and after 1.2 you could move it.

2 results