Gagi Posted October 27, 2013 Share Posted October 27, 2013 Hi guys , i need someone to explain me how to put fixed text in one label for input text. There is code of label for input <div> <label><?php echo __("FTP server"); ?></label> <?php if ($ftpserver["inputType"] == "text") { ?> <input type="text" name="ftpserver" value="<?php echo $ftpserver["list"][1]; ?>" class="form-poshytip" title="<?php echo __("Example"); ?>: server.minecraft.rs" /> <?php } elseif ($ftpserver["inputType"] == "select") { ?> <select name="ftpserver"> <?php for ($i=1; $i<=sizeof($ftpserver["list"]); $i=$i+1) { ?> <option value="<?php echo $ftpserver["list"][$i]; ?>" <?php echo $ftpserver["list"][$i]["selected"]; ?>><?php echo $ftpserver["list"][$i]; ?></option> <?php } // end for ?> </select> <?php } elseif ($ftpserver["inputType"] == "hidden") { ?> <input type="hidden" name="ftpserver" value="<?php echo $ftpserver["list"][1]; ?>" /> <b><?php echo $ftpserver["list"][1]; ?></b> <?php } ?> </div> I have this http://s23.postimg.org/c7soulv0r/image.png but i need to always have this 'fixed' text in that label http://s22.postimg.org/eniz4fr3l/image.png And i cant figure how to do that in this code situation ... Sorry for my bad english and thanks in advance. Quote Link to comment Share on other sites More sharing options...
BrodaNoel Posted October 28, 2013 Share Posted October 28, 2013 That is not of PHP. Is HTML5. Is the attributte "placeholder" of HTML5. Example: <input name="first_name" placeholder="Your first name..." type="text"> You can see an example here: http://davidwalsh.name/html5-placeholder Quote Link to comment Share on other sites More sharing options...
KaiSheng Posted November 18, 2013 Share Posted November 18, 2013 size ="20" Quote Link to comment Share on other sites More sharing options...
BrodaNoel Posted November 21, 2013 Share Posted November 21, 2013 size ="20" are you kidding me? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.