I am trying to make a placeholder for forms in concrete5 using a the tablelessforms addon.
So far I have enabled the form to produce placeholders for inputs using the below code. However, the textarea while displaying, the function str_replace does not replace and add my placeholder.
Here is the code below and a link to the site : http://79.170.44.138/holidayletmidwales.co.uk/newsite/
<div class="fields">
<?php foreach ($questions as $question): ?>
<div class="field field-<?php echo $question['type']; ?>">
<?php if ($question['textarea']) {
$question['textarea'] = str_replace('rows="3"', 'rows="3" placeholder="'.$question['question'].'"', $question['textarea']);
echo $question['textarea'];
} else {
$question['input'] = str_replace('value=""', 'value="" placeholder="'.$question['question'].'"', $question['input']);
echo $question['input'];
} ?>
</div>
<?php endforeach; ?>
</div><!-- .fields -->
Any help would be greatly appreciated.
<?php.. ?>around every line in a contiguous block of PHP code - RiggsFolly