Hello,
I am new to Community Builder. And I had gone through the Hello World plugin documentation and understood it.
My requirement is a little different than this. I need to build a plugin that posts the user information as an XML file to an external URL through Ajax.
The Ajax code is ready and working as expected.
The only problem that I am facing is, integrating the code with CB to create a plugin.
I need the code to work on the registration page and as soon as the user hits the submit button, the Ajax code should work, which will do the rest.
Here's what I have done till now:
$_PLUGINS->registerFunction( 'onBeforeUserRegistration', 'sendXML', 'sendXMLtab' );
class sendXMLtab extends cbTabHandler
{
function sendXMLtab() //Constuctor
{
$this->cbTabHandler();
}
function sendXML()
{
$return = NULL;
$params = $this->params; // get parameters (plugin)
$is_sendxml_plug_enabled = $params->get('sendXMLPlugEnabled', "1");
if ($is_sendxml_plug_enabled != "0")
{
$return = "<div align='center' id='studentInfo'>
<input type='text' id='studentName' name='studentName'><br/>
<input type='button' name='submit' value='Submit' onClick='javascript:requestStudentInfo();'>
</div>";
}
return $return;
}
I'll appreciate any help or advice from my fellow Joomlapolitans.
Regards,
Gurpreet