WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 R24 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • Modules (Moderator: Boudi) »
  • Miniform & JS in template
  • Print
Pages: [1]   Go Down

Author Topic: Miniform & JS in template  (Read 61843 times)

Offline dbs

  • Betatester
  • **
  • Posts: 8928
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Miniform & JS in template
« on: May 30, 2018, 10:30:18 AM »
Hello, in miniform 0.9 i had added below the miniform template html code a javascript block.
This worked fine.

After upgrade to miniform 0.12 the code output in frontend has been corrupted.
E.g. it changed from
Code: [Select]
<script>
$(document).ready(function(){
my code ...
to
Code: [Select]
<script>
$(document).ready(function())
     })
my code ...

I removed the js block from the template an created a code2 section below the miniform section. So it works again.
But i want have html and js together in the miniform template. Is it possible?
« Last Edit: May 30, 2018, 10:35:20 AM by dbs »
Logged
https://onkel-franky.de

Offline dbs

  • Betatester
  • **
  • Posts: 8928
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Miniform & JS in template
« Reply #1 on: March 22, 2019, 04:29:33 PM »
For users with the same problem, the solution is:
miniform v0.14

or
change view.php line 327
from
Code: [Select]
$template = preg_replace('#\{(.*?)\}#s', '', $template); to
Code: [Select]
$template = preg_replace('#\{(?=\S)(.*?)\}#s', '', $template);
thanks to Ruud  (Y)
Logged
https://onkel-franky.de

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • Modules (Moderator: Boudi) »
  • Miniform & JS in template
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2