Hi,

I have created a content type with a 'Date' field I want to be hidden from the user, but when I configure it to be hidden in "manage display" it seems to make no difference and is still present. I also noticed it makes no difference if the field is mandatory or not (no red asterisk appears)....Is this a bug or am I not following the correct procedures?

Thanks,
Paul

Comments

ayesh’s picture

You mean the line that goes below the node title that says "submitted by USER on DATE-TIME" text ?

paulfield05’s picture

Hi Ayesh,

No I actually have a date field within a content type.
The logic behind it is I would like to a produde a graph using views (integrated with Google Charts) of all nodes of this specific content types, with the date field (in question) populating the x-axis. The individual creating the content should not have the capabilities to change the date field.
A way round the use of a date field would be if the Views module could could have "creation date" as a field without need for a date field in the content type (if that makes sense).

Hope this clarifies things a bit.

Thanks,
Paul

geekglue’s picture

Setting a field to hidden should make it not appear in the view. This may sound stupid but make sure you are setting the "Format" to hidden and not the "Label". Required fields should have an asterisk (just checked on one of my sites and it's definitely working). I guess confirm it's in the source and that your themes css isn't hiding it.

anumia’s picture

Hello,

Every content has a creation date in the database. When you use views, this content creation date is available for use, please check. Good luck.

paulfield05’s picture

It might also be worth noting that when I delete the date field I get the following error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.field_data_field_routine_exercises' doesn't exist: SELECT DISTINCT field_data_field_routine_exercises0.entity_type AS entity_type, field_data_field_routine_exercises0.entity_id AS entity_id, field_data_field_routine_exercises0.revision_id AS revision_id, field_data_field_routine_exercises0.bundle AS bundle FROM {field_data_field_routine_exercises} field_data_field_routine_exercises0 WHERE (field_data_field_routine_exercises0.deleted = :db_condition_placeholder_0) AND (field_data_field_routine_exercises0.bundle = :db_condition_placeholder_1) LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => routine ) in field_sql_storage_field_storage_query() (line 577 of C:\wamp\www\modules\field\modules\field_sql_storage\field_sql_storage.module).

Not sure if this sheds any more insight....

Paul

savithac’s picture

Change "Date Field" Format in Manage display.
It's hidden in view of content only.
Edit page of content "Date field" is available. But not able to be hidden "date field" in edit page.

paulfield05’s picture

Thanks Savithac.
I've ended up removing the date field all together as I wasn't aware that Drupal stores the content creation date anyway, so I don't actually need to have a "Date" field defined :).
I'm sure I'll have to use Date at some point though so your input is much appreciated.