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

Removing Form Elements From Other Modules

Hello I'm working in Drupal 4.6. I'm building an in and out office module for our intranet. I'm new to Drupal but not new to PHP. At any rate I'm wondering if someone can point me in the right direction. I need to know what function/functions to add to hook_form() or other hook to get the "Scheduler" form element out of the road and secondly how to make the "title" a hidden field with a predetermined value.

Thanks for your help

Do you have to use mktime to store Date form type?

I have a date form element in a new module, have two questions:

Form element:

  $form['review']['proceduredate'] = array(
    '#type' => 'date', 
    '#title' => t('Date you had the procedure'), 
    '#default_value' => $node->proceduredate,
    );

When I insert this into my table with a int(11) field called "proceduredate" - I'm using mktime, but is this necessary?

Module: "insert_block" Block list

I have a few questions on the insert_block module if someone could help me?

Does anyone have a list of the names needed for the "insert_block" module?

[block:<name of module>=<delta of block>]

I'd like to get a list of the names of blocks. Is it the same as they appear in the www.example.com/admin/block page? e.g. [block:Recent blog posts], [block:Recent comments]

Also, what is a delta?

I'd like some fresh eyes please

I'm not a module developer however one module (CSS) which I was using in 4.6 is not available for 4.7 so I'm trying to rewrite it.

I've been stuck in the Forms API for the last 2 days but being totally new to Drupal and not a great PHP coder, I think I'm stuck between a rock and a hard place.

summary.. simple I hope!
I would like a textarea on the add/edit node page so I can input extra CSS which I plan to then call into the head per node as required, and as raw text between <style></style> tags.. I don't want an import (.. I could use the raw text to do that if I do later)

these forms are controlled by permissions too.

Taxonomy Access Control too Fine-Grained

I've been looking at TAC and trying to figure out how to get it to meet the needs of my site, but it's just not happening. Here's the situation:

We want to restrict access to certain taxonomy vocabularies when someone is creating content (e.g. a blog entry). TAC does a good job with this, but it is too fine-grained, making our site run somewhat slow when it goes through and verifies each part of the vocabulary against a user's permissions.

Problem writing to the database

I am trying to add some custom fields to my drupal module, but am having problems actually getting the data to the database. In the database there is a field I added called "htype" and is a char(8) field. In the form hook my line is:

$form['htype'] = array('#type' => 'textfield', '#title' => t('Type'),'#default_value' => $node->htype );

However when I hit submit, nothing shows up in the databse.
I am new to this kind of drupal modification, so I could be way off on this, any suggestions?
Thanks

Pages

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