Joe

Userforms? https://github.com/silverstripe/silverstripe-userforms

Show 1 attachment(s)
silverstripe/silverstripe-userforms

UserForms module provides a visual form builder for the SilverStripe CMS. No coding required to build forms such as contact pages.

Hide attachment content
Emily

Hey! Does anybody know the multiform addon?

kinglozzer

If I understand your question correctly, it sounds like you want DBField::create_field('HTMLFragment', $htmlString);

Lorrain Fontaine

Hi. Is there a way to to format a string in a regular method so that it's returned as HTML instead of just a string?

kinglozzer

e.g. https://www.ccn.ac.uk/assets/hero-images/Courses/cc76652a72/courses-for-school-leavers.jpg will serve a much smaller webp instead of a jpg if your browser supports it (check response headers in inspector)

Show 1 attachment(s)
kinglozzer

It’s a PITA to get set up initially, but it’s great for appeasing the Google Gods to improve pagespeed scores

kinglozzer

@r3v3rb I tried that before and gave up. Ended up using mod_pagespeed, which automatically looks at the Accepts header to check if webp is supported and then automatically generates a webp copy and swaps it out if it is supported