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

Why the change in the from API from beta2 to beta3 with regards to #type => checkboxes, and how to deal with it?

The result of a #type => checkboxes call changed. and my module is misbehaving :-(

In beta 2 the array from a group of checkboxes created with a #type => checkboxes call would look something like this:

[file] => Array
        (
            [files/uploads/jsdomenu.config.js] => 1
            [files/uploads/jsdomenu.inc.js] => 0
            [files/uploads/jsdomenu.js] => 0
            [files/uploads/jsdomenubar.js] => 0
        )

Now in beta3 it looks like this:

[file] => Array
        (
            [files/uploads/jsdomenu.config.js] => files/uploads/jsdomenu.config.js
            [files/uploads/jsdomenu.inc.js] => 0
            [files/uploads/jsdomenu.js] => 0
            [files/uploads/jsdomenubar.js] => 0
        )

I had validation code depending on that 1!! *argh*
Anyway, it should not be too much of a problem to work around that. The real problem is that when validation fails, or preview is used, all checkboxes become checked automagically. That did not happen in beta2.

this is how I call the checkboxes:

$form['files']['file'] = array(
      '#type' => 'checkboxes',
      '#title' => t('Files'),
      '#default_value' => $node->file,
      '#options' => $files,
    );

And this is a typical $files for the #options:

Array
(
[files/uploads/jsdomenu.config.js] => jsdomenu.config.js

how do i do a upload-form?

Hey guys,

I'm try to do a module that saves just one specific file with a upload form, like an attachment, with a "browser" button and an input text. But i don't understand how can i do the files should be save! how can i save the files from a computer (for example?) Is there a specific module that can i have grounds? or did you know a way? please guys, help me!

Thanks about the attention!

why does it save in .txt?

Why does upload.modules save in .txt?

for exemple, whe i try attach some file with upload.module it saves the file in .txt.
I'm trying attach a *.mtf file and i set in settings the file extension... but when i hit down the attach button it come back with "name.mtf.txt"

why?? may anyone help me? pleease!!

Category.module updating beta versions

Greetings,
When new versions of category.module (or other modules) are updated is it just a matter of overwriting the files in the modules folder? I've read a couple of threads on 4.7 that the database will not be affected once the official version is released.
Mil gracias,
lsabug

hook_user() load/save baffles me

I'm saving and retrieving custom fields with the user information, but not using the profile module. So I've written the hook_user() function in my module and I can enter these new fields at registration of a new user and edit the account. I wrote my own load and save functions and everything loads and saves. Life is great.

Staging module

One thing I miss in Drupal is a staging/testing function, to check new versions, modules, templates etc before putting it on the live server. So I'll try to write a module for this.

[First question: is someone already working on this?]

I'll give a outline of my plans here, hoping to get weak parts critizised and some questions answered.

Functionality of the module will be inspired by the method described in http://drupal.org/creating-drupal-test-sites

Pages

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