FYI - Form not submitting on mobiles b/c layout=default

cmendla

Member
I noticed that some forms were not submitting from mobile devices.

The solution turned out to simply be to change the form layout to 'bootstrap' instead of default.

I'm not sure if this is particular to the template I'm using or not but it worked for me.

edit --- apparently the template wasn't my only problem. JCE keeps adding <p> tags to the embedded call. I'll address that in a separate post. right now, I have to toggle editor to clean that up.
 
There's no "default" template in Fabrik3.2 (if so then it is a restover from a former Fabrik3.0 installation).
Fabrik3.2 is coming with bootstrap and bootstrap_tabs only, if you need custom templates (e.g. you've created some in Fabrik3.0) you must create them new starting with the bootstrap ones.

Additionally Fabrik3.2 needs a Joomla bootstrap template (BS2, compatible with Protostar coming with Joomla).
With protostar and bootstrap my form is submitting even if in content with p-tags, so this seems to be also an issue with your template.
BUT: in general the first thing I do with JCE and MCE is to switch this terrible automatic p-tag off (which is breaking several layouts including the Fabrik element labels)
 
Hmmm, I thought we'd fixed that p-tag thing ages ago, I remember putting in some code to detect and remove p-tags surrounding {fabrik ...} incantations.

-- hugh
 
Ah, the code will only remove them if they are immediately surround the plugin text ...

PHP:
/* $$$ hugh - hacky fix for nasty issue with IE, which (for gory reasons) doesn't like having our JS content
* wrapped in P tags.  But the default WYSIWYG editor in J! will automagically wrap P tags around everything.
* So let's just look for obvious cases of <p>{fabrik ...}</p>, and replace the P's with DIV's.
* Yes, it's hacky, but it'll save us a buttload of support work.
*/
$pregex = "/<p>\s*{" . $botRegex . "\s*.*?}\s*<\/p>/i";
$row->text = preg_replace_callback($pregex, array($this, 'preplace'), $row->text);
PHP:
    /**
    * Unwrap placeholder text from possible <p> tags
    *
    * [USER=20939]param[/USER]  array  $match  preg matched {fabrik} tag
    *
    * @return  string
    */
 
    protected function preplace($match)
    {
        $match = $match[0];
        $match = JString::str_ireplace('<p>', '<div>', $match);
        $match = JString::str_ireplace('</p>', '</div>', $match);
 
        return $match;
    }

I could probably improve that, so it detects surrounding p tags even if they aren't immediately around the {fabrik ...}, i.e. there's other text between the {} and the tag.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top