Extending Forms in JomSocial 1.8

Posted by: azrul

Tagged in: JomSocial 1.8 , development

While we work day and night to finish up the upcoming JomSocial 1.8, I would like to take a moment to introduce a new API which is extremely handy for plugin developers.

What we just added to JomSocial 1.8, is the ability for JomSocial plugin to intercept the rendering of any form and inject their own HTML code into the form. Perhaps it would be best if I explain this visually.

 

 

 

This is what a typical new photo album creation looks like

With a plugin, it is rather easy to inject, say a check box options such as the one below.

 

See how I just added a new radio button and some code within the form. All this are done within a plugin without touching any of the template files!

Of course, to compliment this new  API, plugin will also be able to perform its own validation, and if necessary stop the form from being validated and proceeding to the next page. Pretty neat huh :-)

 

6 Response(s)

You must be logged in to post a comment. Please register if you do not have an account yet.
hua12
hua12
October 21, 2011
Find true love and be a true lover as well.May you find a love which is not only strong as death, but to leave to a truly for feeling life.http://www.belstaffjacketzone.com http://www.cheapmoncler2.org/

John-Paul Takats
John-Paul Takats
September 07, 2010
The documentation does cover using onFormDisplay, however this trigger does not seem to fire on the upload a photo form which is where I really need it to be. http://www.jomsocial.com/docs/Event:_onFormDisplay
John-Paul Takats
John-Paul Takats
September 07, 2010
Is there an example anywhere on how to create a plugin like this? This is exactly what I need! Thanks
testcouch
testcouch
June 18, 2010
@Azrul
i don't know exactly if this scenario with the new API possible or not. I look for a simple way to enhanced the Report Photo Function. Can i insert in the Jomsocial form a Joomgallery Frontend Upload form to Upload/Transfer a Jomsocial Picture Copy with Title and Description field to Joomgallery?
Francesco
french150
June 18, 2010
It seems interesting! But i hope strongly that it will be possible to insert a link to allow developers, using a wizard, to introduce programm by API, like facebook. It would be great and finally the procedure more powerfull!!
Bye.
Andrew Peeling
Andrew Peeling
June 18, 2010
This is great! When will it be up in the docs so we can start coding for 1.8?
busy