Forums

Joomla Registration using a Chronoform

peta 05 May, 2008
I recently downloaded and installed the latest Chronoforms for Joomla 1.5.

Then I made a form to do Joomla Registration.

This initially did not work, when the form was filled in and submit was pressed, nothing happened.
I checked Joomla users and there was no new entry.

So I had a look at the code for the component and identified this code in chronocontact.php - the
main switch statement.
switch ( $task ) {

	case 'send':
	uploadandmail();
	break;

	default:
	showform ($posted);
	break;

}
I put some debug code in before the 'switch' and discovered that the value of $task was 'register_save'
at this point, not 'send'. So I added another case to the code as follows:
switch ( $task ) {

	case 'send':
	uploadandmail();
	break;

	case 'register_save':
	uploadandmail()
	break;

	default:
	showform ($posted);
	break;

}
I tried the form again and this time on submit the screen changed, saying REG_COMPLETE_ACTIVATE. The good
thing was, the user had been created in Joomla.:)

I found a thread on this forum which said to upload en-GB.com_chronocontact.ini to the joomla languages/en-gb folder which I did. I tried to register a user again and it worked, this time ending with a sensible message.

Has anyone else had this problem with Joomla registration using a Chronoform? and is my change to the switch code appropriate?

Thank you.
Peta
Max_admin 05 May, 2008
Hi Peta,

you had this issue because you have a field named "task" in your html, and so this overwritten the task field of Chronoforms, if you didn't have a field name called task then all would go smoothly, other than the language file issue of course😉

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
peta 05 May, 2008
Thank you Max. You must have seen this one before. I pinched the code from the Joomla registration source and left in a hidden field named task with a value of "register_save" below the submit button code. Now all is clear:)

Peta
This topic is locked and no more replies can be posted.