Search

I'm not a php developer. But sometimes I got ideas: if then it could be awesome, else we need a workaround.

Sometimes I think a default value for a field could be really usefull. So I opened today a field.php file and start reading and understanding the structure and the code.

At the point of checkPostFieldData I thought this must be the place ... so if strlen is zero there must be no value. The field wasn't required also. What about a default value? That way we got at least a value to display or to use as filter. But how to set the value?

The api told me to use setData. But as I told I'm not a php developer. I can read, I can think but one of my shortcomings is I'm not a hardcore backend coder.

I hope for some suggestions.

The next steps are some backend options for every field, a checkbox 'I like to have a default value' and of course an input field for the default value. But heck let solve first things first.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details