Field value is not shown in View mode

4 posts by 2 authors in: Forums > CMS Builder
Last Post: July 19, 2019   (RSS)

By andreasml - July 16, 2019


I have given the following default value for a certain field ("treating_physician"):

<?php echo $CURRENT_USER['fullname'] . " " . $CURRENT_USER['firstname']  ; ?>

The type of field is a list field and the possible options in the list are taken from the following script:

SELECT CONCAT (fullname, " ", firstname)
  FROM `<?php echo $TABLE_PREFIX ?>accounts`
  WHERE hospital='<?php echo $CURRENT_USER['hospital'] ; ?>'
  ORDER BY fullname

So far it works great. However, I just noticed that in the View mode of the record, there value on the field "Treating physician" is not shown although it does exist in the Edit mode.

On the contrary, if I choose the type of field as text field instead of list (using the same default value as shown before), the value of the "Treating physician" is shown in the View mode as well in the Edit mode.

As I want users to be able to choose only from a specific list of names the value for the treating_physician field, I wouldn't like to change the list type to the text field type. 

I am not quite sure what I am doing wrong.

Kind regards,

Andreas Lazaris 

By gregThomas - July 17, 2019

Hey Andreas,

I've done some local testing, but wasn't able to recreate the issue on my local setup, would it be possible to complete a second level support request so I can take a look at the site affected:

I'll need the CMS login credentials so that I can work out the source of the issue. 

Greg Thomas

PHP Programmer -

By andreasml - July 18, 2019


I have completed a second-level request