How to add a new Input Field Type?
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #7
RE: How to add a new Input Field Type?
Thank you Lee for the help Love Love

If you use the string date (useful is you want move thread on date expiration, the first post I added here):

Text Mask Filter: Custom (regex) and ^((?:19|20)\d\d)/(0?[1-9]|1[012])/(0?[1-9]|[12]\d|3[01])$

Input Formatter: <?=strtotime({VALUE})?>

Use Custom Input HTML yes and in Input Field HTML:

Code:
<if THIS_SCRIPT != 'editpost.php' then><input type="text" class="textbox"{NAME_PROP}{MAXLE​​N_PROP}{WIDTH_PROP_SIZE}{TABINDE​X​_PROP}{REQUIRED_PROP} value="<?=strtotime({VALUE})?>" id="datepicker" /><else><input type="text" class="textbox"{NAME_PROP}{MAXLE​​​​​​​N_PROP}{WIDTH_PROP_SIZE}{TA​B​I​N​D​E​X​_PROP}{REQUIRED_PROP} value="<?=date('Y/m/d', (int){VALUE})?>" id="datepicker" /></if>


Display Format: <?=date('d-m-Y', {VALUE})?>

When you add date in newthread and edit date in editpost still you'll have US format date (yy/mm/dd) but patience.. "he who grasps at too much loses everything" Biggrin

09-17-2015 01:46 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: How to add a new Input Field Type? - nier3 - 09-17-2015 01:46 AM

 Standard Tools
Forum Jump: