This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

using xx_form_alter and apply to story

Hi,

I want to add a textfield to the page where a new story is creating. And I can add that textfield to any page with form through xx_form alter funtion. But with little knowledge of php and drupal. I was kind lost when I tried to apply that only to a new story creating page.

Could someone kind enough to explain a little bit of the following code I copied from an example of hook_form_alter function, or provide a url that I can continue my learning? Thanks.

Customize editability of nodes withing a group based on group membership

I have content types (such as a node type called "data") that get used by people of various og groups. I do not want to allow a person in group B to edit data nodes that belong to the website but not to a group, so I don't want to grant them edit permission to other people's files. However, I WOULD like to allow a person in group B to be able to edit another data node created by another person in group B.

Any suggestions as to a good approach?

Multiple file uploads

Hello,

I have a form in a module of mine which contains mutliple file fields for uploading images. In the HTML they have names of the form edit['images'][0...n], where n is some number I choose. On insert I need each of these to be processed by the image module. This page describes how to do this for one image field, but I'm not sure how to extend this to multiple fields. Any help?

Thanks.

adding custom profile fields to main category on user profile page (my account page)

How do I add profile fields to the main account settings page under my account..edit? I am adding a few admin fields that only I adjust for users and I want to add the fields to the main account settings page. Right now if I add a category basically all the user sees is a blank page when they click on that tab which is stupid bc I don't want them to see anything.

Form API How to add fields to a core form

My new 5.0 module needs to add text and a field to a core form (from user.module). Could someone please point me to some examples of this being done?

The form API docs say that it is possible to alter core forms using a hook, but I have been unable to find any examples or explanation.

Your assistance will be appreciated.

Thanks

David

Examples of Import/Export API use

Can anybody point me to some modules that use the Import/Export API?

I need to build a simple[?] module, that allows a user to upload a CSV/XLS file, and the module should drop some existing data in the DB, and replace this with the data in the spreadsheet.

Ideally there is a module that does something similar that I can look at the code and see how it goes.

I'm reading through the Import/Export API documentation at the moment, but a good example of the API in use could help me get my head around it.

Any ideas?

Regards
Alan

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions