Hello,
I need to tweak the code of the comment form to add placeholders to the input and textarea tags.
How can i do this ?
Thanks
Printable View
Hello,
I need to tweak the code of the comment form to add placeholders to the input and textarea tags.
How can i do this ?
Thanks
Hey, try this. Haven't tried it, but the docs say this should work. You've probably found where the form fields are in the template, each field looks something like this:
Right before that, add this line (for each, making sure to change ['name'] accordingly):Code:<?php echo $this->fields['name']->generateLabel(); ?> // For the label
<?php echo $this->fields['name']->generateWithError(true); ?> // For the input
It looks like most/all of the input attributes and events are supported by doing this.Code:<?php $this->fields['name']->placeholder = 'Something Goes Here'; ?>
Thanks Brian, it works perfectly 8-)