BP Profile Search › Use placeholders instead of labels
-
AuthorPost
-
Adele
GuestHi Andrea
How can I customise the form template to use placeholder text instead of labels?
andrea
Plugin AuthorHi Adele,
If you wish to customize the textbox search fields, locate the ‘textbox’ case in the template, and add the placeholder attribute:
case 'textbox': ?> <input placeholder=<?php echo $f->label; ?> type="search" id="<?php echo $id; ?>" name="<?php echo $name; ?>" value="<?php echo $value; ?>"><br>Then you will have to remove the label for the textbox fields. Locate the lines that display the field label, and enclose them in an
ifstatement:<?php if ($display != 'textbox') { ?> <label for="<?php echo $id; ?>" class="bps-label"> <strong><?php echo $f->label; ?></strong><span> <?php echo $f->mode; ?></span> </label><br> <?php } ?>To read more about modifying the default form template, please see:
Lolo
GuestHi, I’m trying to do the same thing, but I don’t quite understand how to do it.
I’ve managed to put a placeholder inside a selection field, but I can’t manage to put a placeholder inside a any profile field, because I have not field ID.
How can I made it?
andrea
Plugin AuthorHi Lolo,
I’m not sure I understand your question correctly. Which field ID do you need?
-
AuthorPost