0

i want to generate an input mask for my invoice number search functionality like this AADI/currentmonth/currentyear/input_number. where AADI/ is fixed for the input box

so user can change the currentmonth and currentyear and input_number for search without writing " AADI/ " again and again.

<input type="text" class="form-control" name="bill_no" id="bill_no" />

please forgive me. my English is very bad. in a learning phase :)

vitally
  • 377
  • 6
  • 17
  • do you want to write your own solution or are you willing to use a pre-made solution. I can suggest a good one and help you through it if so – Mike Hamilton May 16 '15 at 13:35
  • i just want my desired functionality. i can use the pre-made solution also. no problem. – vitally May 16 '15 at 13:38

2 Answers2

0

Create a variable and concatenate the two values together in to one string.

$value = "AADI/".$_POST["bill_no"];
Ben Lewis Watson
  • 168
  • 2
  • 11
  • no no you don't get my mind. i want the string AADI to be set like a placeholder in an input box. and the rest of the input value enter by the user to be concatenated with it – vitally May 16 '15 at 13:44
0

u can use 2 input box ,and css like

<div>
<input type="text" disabled="disabled" value="AADI/05/2015/" class="fstinput" name="fstinput">
<input type="text"  class="sndinput" name="sndinput" >
</div>



.fstinput {
border-right: 0 none;
float: left;
width: 90px;
}
.sndinput {
border-left: 0 none;
float: left;
width: 150px;
}
  • nope ! bad idea. because i can't just give a value as value="AADI/05/2015/" because it can be editable and i don't want the user to edit default AADI string in inside the input box – vitally May 16 '15 at 13:48
  • see this http://stackoverflow.com/questions/2913236/html-text-input-field-with-currency-symbol/2913366#2913366 – Tanvir Hasan May 16 '15 at 13:58