placeholder?
2 posts by 1 authors in: Forums > CMS Builder
Last Post: March 16, 2015 (RSS)
By Toledoh - March 16, 2015
Hi Guys,
I'm wanting to be able to type into the WYSIWYG, something like ##hi there##, which will be replaced (via php?) to produce <input placeholder="hi there" />. I would need to be able to to type whatever within the ## and have that become the placeholder text... ie. ##Enter your name## would display as <input placeholder="Enter your name" />
Any thoughts?
Tim (toledoh.com.au)
By Toledoh - March 16, 2015
Got it.
!#Input here#! becomes <input placeholder='Input here' />
<?php echo str_replace("!#", "<input placeholder='", str_replace("#!", "' />", $articlesRecord['content']));?>
Tim (toledoh.com.au)