Forums

Remove the auto form tag

jkpathan 20 Jun, 2008
I am trying to create a chrono form which will echo the text for a CSV file. Everything works perfectly if I run the code except for the fact that Chrono inserts the <form ...> tag automatically at the start. My code is as follows:
<?
echo "namespace,className,summary\r\n";
echo "sohail,shaikh,great\r\n";
?>
The Chrono form above outputs the following:
<form name="ChronoContact_test" id="ChronoContact_test" method="get" 
action="index.php?option=com_chronocontact&task=send&chronoformname=test" >
		
				namespace,className,summary
sohail,shaikh,great


I need to disable the auto-generated form tag. Is there a way to do this? Any insight will be greatly appreciated.
GreyHead 20 Jun, 2008
Hi jkpathan,

You'd have to hack the code (but that might break other forms) - ChronoForms does *forms* and assumes that anything in the FormHTML field needs to be wrapped in form tags.

Output from the submitted form page doesn't include the form tag. Say a bit more about what you are trying to do and there may be a workaround.

Bob
jkpathan 25 Jun, 2008
Sorry for my delayed reply. Here is what I am trying to do. I am developing a complete AJAX based website using Joomla 1.5 and dojo. The example I gave in my first post was a simplified example of chrono forms returning CSV data to a dojo grid to populate it. Of course the actual file will read data from a database and then return it to the dojo grid when it makes an AJAX call.

I thought the following would work:
<? 
echo "namespace,className,summary\r\n"; 
echo "sohail,shaikh,great\r\n"; 
die();
?>


But its generating the form tag as well. I also attempted to put the code above in the After Submit sections but then I get into the problem of accessing it from dojo directly.

I think I have also found a bug in the Joomla 1.5 version of Chrono. If I create a simple form with nothing in it but an input box and a submit button and After Submit it just echoes "Hello World" and the form's method is set to POST, it works but when I change it to GET, the page just redirects to index.php? which means Home.

For my AJAX to work I will be passing attribute data using GET.

Any help or guidance will be greatly appreciated. Thanks in advance.
GreyHead 25 Jun, 2008
Hi jkpathan,

I really can't help much with this - maybe Max can do more. I think that you will need to hack the ChronoForms code to have it do what you want.

AFAIK the Get/POST option juct changes the method attribute in the form tag. I don't know why it woudl redirect to index.php.

Sorry,
Bob
This topic is locked and no more replies can be posted.