We have some custom forms to add to matrix and their action needs to point to various cgi/pl.
By default a custom form's action point to itself - can this be changed?
We've tried using the 'Page Contents' bodycopy to nest another form with the cgi/pl action but the CGI isn't being called and we think it is because we have a form within a form i.e.
[codebox]<form id="form_email_36463" enctype="multipart/form-data" action="/biz/studentnet/it_services/24-hour_access/student_lab_account_activation/_nocache" method="post" >
[snip]
<form language="JavaScript" action="http://cgi.biz.uwa.edu.au/cgi-bin/stu-oaa.pl" method="post">
%form_contents%%submit_button%
</form>
</form>[/codebox]
Sarah
You can't change a Custom Form's action at the moment, no. You would have to build the form manually in a Standard Page. However, I think there is development in the pipeline that will allow you to change the behaviour of Custom Form in a future version. Greg would know more about that. I may have just dreamt it. :)
There is, but nothing to do with changing where the form submits. The dev currently underway is to allow the data submitted to be sent to an external DB. The form still needs to submit back to Matrix.
[quote]We have some custom forms to add to matrix and their action needs to point to various cgi/pl.
By default a custom form's action point to itself - can this be changed?
We've tried using the 'Page Contents' bodycopy to nest another form with the cgi/pl action but the CGI isn't being called and we think it is because we have a form within a form i.e.
[codebox]<form id="form_email_36463" enctype="multipart/form-data" action="/biz/studentnet/it_services/24-hour_access/student_lab_account_activation/_nocache" method="post" >
[snip]
<form language="JavaScript" action="http://cgi.biz.uwa.edu.au/cgi-bin/stu-oaa.pl" method="post">
%form_contents%%submit_button%
</form>
</form>[/codebox]
Sarah[/quote]
You could always try using javascript to change the action of the form, not sure if it would break any of the functionality though…
document.forms[0].action = "http://www.example.com/";