Hide Newly Created Fields in Production Apps
When rolling out new features that involve the addition of new fields on nodes (that should not be shown to user), how can I hide newly created fields until I am able to hide them via hook_form_alter in the next app roll out?
@mkinnan This is the main reason why I started building custom "node creation" forms for each app, instead of relying on DrupalGap's built in pages (which are shotty at best often times):
Here's the docs on how to build your own content add/edit form:
http://docs.drupalgap.org/7/Entities/Editing_Entities
Otherwise, you'd at minimum want to go with a production and development environments to separate the two. There are other ways as well to get around this, but I'd recommend starting with the ones listed above. Thoughts?
@signalpoint Hmm ... that's going to take some time and work to figure out how to build custom node add/edit pages ... I have organic groups fields, address fields, entity reference fields, etc. Do you have examples anywhere with these types of fields?
It seems the custom content add/edit pages will have to be the way to go because I don't see any other way to roll out new features (requiring fields) on a production server without first creating fields and then uploading the new versions of the app to the stores. Even then, you may not have people download the new app version for days.
@mkinnan It indeed takes some time, but it is worth it for the control. Again I hate to admit it, but DrupalGap trying to provide support for every field and each settings use case out there is really difficult to accommodate. So, I feel your pain.
The other way is to use a Services alter hook in Drupal to remove the field info/instance(s) for your new fields, so they aren't returned to the app. http://cgit.drupalcode.org/services/tree/docs/services.alter.api.php?h=7.x-3.x
if ($controller['callback'] == '_system_resource_connect') {
// Remove things from the $result here.
}