Forum

Thread tagged as: Question

Set defaults on time field

Is there a way to control the default time displayed on a time field?

I have the following code:

<perch:content id="time" type="time" label="Time" format="g:ia" order="3" />

In admin, the time defaults to that of the server (I assume it is the server but it could be the local computer time) but I would like it to default to say 00:00

Thanks, Andy

Andy Knight

Andy Knight 1 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you tried using the default attribute?

Drew McLellan said:

Have you tried using the default attribute?

Hi Drew,

I have now and that works!

<perch:content id="time" type="time" label="Time" format="g:ia" default="00:00" order="3" />

Thanks :)