I've only been using Drupal for a few months and really enjoy it, but I'm still learning the ropes and I'm hoping to get some help with a problem I've run into.
The problem: Create a node edit form variant that modifies only one field of a content type.
I have created a variant of the node-edit form (title: Checkoff) for the a particular content-type (type: Task). The variant is triggered by a selection rule that looks for a variable in the url. That part is working fine and the variant is being called successfully when I want it to be.
The variant is a panel that displays only one field from the edit form and has a save button. The variant Checkoff ideally would only displayed the field is_completed and a save button rather than entire node edit form as a simple way for a user to update only the is_completed field. This all fits into a management system to keep track of task for a communications team.
This is what the variant looks like:
http://martelonia.com/sites/default/files/checkoff.png
The problems is that when I try to save the node from the variant it says that one of the fields that is not being shown is has no value. The values were all entered in correctly when the node was created.
What I have learned so far about this problem is that the fields not included in a Pane are still submitted via the Form API, but they have no values. It seems that form submission respects permissions, so you can limit the hidden field permissions by Role to block them from being submitted, but this is not a solution I can use. I need a single user to see a different variant of the node edit form different based on the url it is was called from.
Any help or insight is greatly appreciated. Thanks!
Comments
how do you hide the field?
is the field required?
depending what, you can make a custom module, use rules or javascript.
good luck :)
//trying to answer one question for each one that i make.
//this way, drupal will be more friendly and strong
I get the same result if the
I get the same result if the field is either required or not. Unfortunately I have a lot of learning to do before I am able to make my own modules.
_
Other than using field permissions, the only other way I can think of involves writing code in a custom module.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.