Hi,
I just need a form to be made with cck with no advanced settings like Comment Settings, Authoring information, Revision information, Publishing options, etc for the users to post in some details.
I created a content type "sell car".
I added some fields that will get information about cars with fields like model, year of purchase etc.
So as soon as users fill in this form it should be posted as a node on the site.
when users are about to fill this form, they should not be unnecessarily be handling the
Comment Settings, Authoring information, Revision information, Publishing options, etc that are fieldsets.
I tried to disable permissions for administering comment settings but it removes that feature for all content types.
There is no option to disable those fieldsets.
more appropriately those should not be displayed to the users who come to enter information about cars.
Some suggested preventing them from display through customisation, but i feel it is not an efficient way unless that has been completely removed for that particular content type alone.
In short i want ppl to use the form to enter info about their car and it should get posted on the site just like a content type.
Comments
Comment #1
ainigma32 commentedI suppose you could use hook_form_alter http://groups.drupal.org/node/4308 to remove those fields from the form. Or you could remove the fields using the theme registry http://drupal.org/node/223463. Either way it would mean customization.
I'm not aware of some built in configuration screen that will allow you to turn those fields off.
- Arie
Comment #2
ainigma32 commented@Sandymaguire: Did you decide on what approach you're going to use yet?
- Arie
Comment #3
jackspiv commentedDon't know if this helps.
Its more of a workaround approach than a customization.
I haven't used D6, but in 5.x, each content type has its own control for comment settings. If you made a content type that was just "Car Information" and it had the CCK fields you want, you could turn off comments just for that type of node.
For the other stuff, Author, Publishing, Revision, etc ... Do you ever need your users (other than admins) to see/change those fields? If not, remove the permissions. Those are all controlled by what the user has access to. This is handled by access control on a user role basis. Can you create a sitewide role for the type of user who's access you want to limit? You could exclude the permission to administer nodes from that role.
Comment #4
Sandymaguire commentedarie thanks for telling me about hooks..
I learnt how to add form elements and unset them..
By default drupal will display those options only for admin...When it comes for other authenticated users and anonymous users its working fine.
Thank u
Comment #5
Sandymaguire commentedyes it depends on roles and that got rectified...
jackspiv i created a customised advance search module extending the default search module...
That form displays my added fields along with the default search box and button....
Search is working perfect.., i wud like to make search through the fields i have include and i want to disable the default text box and button... pls help
Comment #6
ainigma32 commentedWell you can use the same hook_form_alter to change the fields you don't want to show into hidden fields for example.
Or did you manage to resolve this already?
- Arie
Comment #7
Sandymaguire commentedIn the form alter the unset function did not work for the keyword search field and the search button.
I hid them temporarily using javscript.
Thank u
Comment #8
ainigma32 commentedWhatever gets the job done I suppose.
- Arie
Comment #10
Ankit commentedComment #11
quietone commentedUpdating tags for #3565085: Drupal core issue tag cleanup.