Jump to content


Photo

Put a fixed text on an input text


  • Please log in to reply
3 replies to this topic

#1 Gagi

Gagi

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 27 October 2013 - 12:30 PM

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.o...ulv0r/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.



#2 BrodaNoel

BrodaNoel

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts
  • LocationCórdoba, Argentina

Posted 28 October 2013 - 09:36 AM

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.na...ml5-placeholder


Sorry for my bad English


#3 KaiSheng

KaiSheng

    Advanced Member

  • Members
  • PipPipPip
  • 80 posts
  • LocationSinagpore
  • Age:20

Posted 18 November 2013 - 04:11 AM

size ="20"



#4 BrodaNoel

BrodaNoel

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts
  • LocationCórdoba, Argentina

Posted 21 November 2013 - 09:21 AM

size ="20"

 

are you kidding me?


Sorry for my bad English





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com