How to add a new Input Field Type?
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #17
RE: How to add a new Input Field Type?
Oh, so this is not a required field?
Maybe you can try this condition:

Code:
<if {VALUE} && !$mybb->input['my_post_key'] then><?=my_date('d-m-Y',{VALUE})?><else>{VALUE}</if>


The implementation is something like this:

HTML Code
1
2
3
4
5
6
<input type="text" class="textbox"{NAME_PROP}{MAXLE​​N_PROP}{WIDTH_PROP_SIZE}{TABINDE​X​_PROP}{REQUIRED_PROP} value="<if {VALUE} && !$mybb->input['my_post_key'] then><?=my_date('d-m-Y',{VALUE})?><else>{VALUE}</if>" id="datepicker" />
<link type="text/css" rel="stylesheet" href="cache/jquery-ui/jquery-ui.min.css" />
<script src="cache/jquery-ui/jquery-ui.min.js"></script>
<script>
	$(function(){$('#datepicker').datepicker({dateFormat:'dd-mm-yy',autoSize:true});});
</script>


09-21-2015 04: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? - RateU - 09-21-2015 04:46 AM

 Standard Tools
Forum Jump: