JS error on custom form

meadows

Member
I copied the example custom form and put in my elements and I receive this error in chrome tools console: Uncaught TypeError: Cannot read property 'addEvent' of null The form will not submit...I am using Joomla 3.3 and latest stable for fabrik. I use a rockettheme template if that helps. Site is here: http://pilaw.missioncriticalmedia.com/

Quick update: I put the form in protostar to see if it was a template issue but I got the same results.

TIA,
Mark
 
Are you sure you copied everything?

That form has no form. In other words, it's missing the <form ...> tags. Make sure you included the:

Code:
<form method="post" <?php echo $form->attribs?>>

... from the top of default.php, and the coresponding close tag from the end.

-- hugh
 
Errm...
There's no example custom form in Fabrik3.1, you can't use Fabrik3.0 templates in Fabrik3.1.
 
Hmm, ok so I put it back to the default template and just override it using template css. An example template for 3.1 would be nice as I like using templates as I can copy them from site to site easier.
 
It's a bit difficult to create a "general" example because it depends on your settings (label position, with/without repeated groups, repeated groups display list/table...) which of the default_xxx.php files is used/has to be modified.

But yes, there could be some explanation in the WIKI...

I think the main steps are:
copy the bootstrap template(s) (in 3.1 there are different folder for form and details view, if you want a custom template for form and details you have to do it twice)
edit default_group.php and remove the loop (foreach ($this->elements as $element...), do all the stuff for every single element.
You can simplify some parts (e.g. if ($labels_above...) - you know which one is used in your form) but you must keep the overall structure (error message, rowStarted...)
 
That is precisely what I did and it looked like it worked but there was that js error...oh well, other way works. Maybe next project I'll jump back into this.
 
Back
Top