0

I am creating a rather large (100s fields) form using CCK. I would like access to edit the fields to be give to anyone who has access to create the content type rather than by role.

For example, I can allow an anonymous user to edit the field_phone using user permissions, but I do not want the anonymous user to have such permission on other content types, only the custom form.

Also, since there are 100s of fields, managing the edit permission individually kinda drags.

thanks, tom

5
  • 1
    It's hard for me to imagine a content type with >100 fields and it's even harder to imagine if that it would be the best and most usable solution for any problem. Can you explain which problem you're trying to solve? May 5, 2011 at 20:50
  • @marcvangend Its just a web-based form - for gathering info from users like a survey. This one is actually a fairly long health history questionnaire. Really, its not that hard to imagine :)
    – Tom
    May 6, 2011 at 0:18
  • OK, if it's a survey, that explains the number of fields. That said, IMHO a cck content type is not the best solution to build questionnaires. Drupal may not be the best choice for surveys at all, if you ask me. Anyway... I don't quite understand why you need anonymous users to edit field settings. Which problem would that solve? May 6, 2011 at 20:09
  • If it cant be done, then the answer should be "No, Tom, there is no way to do that." Maybe Im just a newb at stack, but trying to debate the merits and strategy of the overall project is far out side the scope of the question and seems quite unproductive. I suppose I could have posted links to the the entire project description and the "odd" requirements to solicit overall design ideas, but the design is set and mostly implemented. At this stage, what I am really after is just an answer to the question.
    – Tom
    May 9, 2011 at 6:32
  • I always aim for the best long term solution, not for a quick technical yes or no. If that's not what you're looking for, maybe I shouldn't be answering this question. I'll add an answer below with all relevant information I can give you right now. Hope that helps. May 9, 2011 at 7:42

2 Answers 2

1

"Editing a field" can mean a lot of things because a field has many properties for input ('widget'), storage and output ('formatter'). That's why I was trying to figure out what you're after.

If you can write PHP, anything is possible, but I think that introducing a way for content creators to edit (a limited set of) field settings, would require a lot of custom code. However I assume that you're looking for a solution that requires no (or a little) custom coding. In order to achieve that, you may need to choose an alternative solution, like a custom compound field, CCK Multigroup or Webform. However I cannot advice you about that because I don't know which problem you're trying to solve.

On a more theoretical level, I think you have to be careful not to get content and configuration mixed up. Drupal stores both configuration (like field settings) and content (the information in a node) in the database. What you're asking sounds as if editing the field settings would in fact become another way to enter information. That may not be a problem now, but it can become a problem later because other modules are not prepared to access field settings as if they are part of the content.

0

I suggest you to use Webform module for surveys. CCK is not the best way to create such things.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.