Jump to content

Text fields - Text and integers


eze102
 Share

Recommended Posts

Hello - Total newbie here. 

I'm using the Profields module to make a table for settings. I would like for one row to contain a "copyright date" with a corresponding integer value according to https://processwire.com/talk/topic/8373-use-delimited-texarea-table-or-yaml-for-settings/

I have this code (courtesy of @Macrura

$copyYear = 2015; // Set your website start date
$curYear = date('Y'); // Keeps the second year updated
echo $copyYear . (($copyYear != $curYear) ? '-' . $curYear : '');
 
I want to set the value for $copyYear in a text field. Will it be parsed as an integer?
 
 

Thanks!!

Edited by LostKobrakai
Added codeblock
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...