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

Is there 'correct way to theme GET forms in 4.7?

Hello,

I'm currently bugfixing my conversion of the Quotes modules to 4.7. One issue I had was with creating a form to use a GET request.

Essentially the form allows nodes to be sorted on a pages, so I considered that POST functionality -- and indeed the Forms API -- was inappropriate. Instead I'm using theme_select, theme_button etc directly, to allow themability rather than just spitting out HTML.

Please help with mysql query!

Hello,

I am about to finish my first module, which turned out to be nearly as big as system.module!

Unfortunately, I have very poor SQL skills. I haven't dealt with SQL directly in years.
So... well, I need some quick help with a query.
I have two tables. One is the normal "node" one:


+----------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+------------------+------+-----+---------+----------------+
| nid | int(10) unsigned | | PRI | NULL | auto_increment |
| vid | int(10) unsigned | | MUL | 0 | |
| type | varchar(32) | | MUL | | |
| title | varchar(128) | | MUL | | |
| uid | int(10) | | MUL | 0 | |
| status | int(4) | | MUL | 1 | |
| created | int(11) | | MUL | 0 | |
| changed | int(11) | | MUL | 0 | |
| comment | int(2) | | | 0 | |
| promote | int(2) | | MUL | 0 | |
| moderate | int(2) | | MUL | 0 | |
| sticky | int(2) | | | 0 | |
+----------+------------------+------+-----+---------+----------------+

How to submit a form with 4.7 form api

I want to develop a simple block module with a simple form. The form has 2 textfields and the values should be saved to a db table. The block developed with the 4.7 form api is shown correctly with my code, but I'm not able to submit the form. Here's my code

<?php

function quickmail_perm(){
return array ('can send quickmail');
}

function quickmail_block($op = "list", $delta = 0) {
if ($op == 'list') {
$block[0]['info'] = t('Quickmail Block');
return $block;
}
elseif ($op == 'view') {
$block['subject'] = 'Quickmail';
$block['content'] = quickmail_form();
return $block;
}
else {
quickmail_submit();
}
}

function quickmail_form($edit = null) {

$form['details']['firma'] = array(
'#type' => 'textfield',
'#title' => t('Firma'),
'#default_value' => $edit['firma'],
'#size' => 15,
'#maxlength' => 128,
'#description' => null,
'#attributes' => null,
'#required' => true,
);
$form['details']['telefon'] = array(
'#type' => 'textfield',
'#title' => t('Telefon Nr.'),
'#default_value' => $edit['telefon'],
'#size' => 15,
'#maxlength' => 128,
'#description' => t('Geben Sie hier die Telefon Nr. ein unter der Sie unseren Rückruf erwarten.'),
'#attributes' => null,
'#required' => true,
);

$form['details']['submit'] = array(
'#type' => 'submit',

Virus alert module?

Is there a module for the virus alert level or can someone point me in the right direction to making one.

Problem, upload.module v1.83 creates a duplicate when attaching file in 4.7b6

Greetings,

I'm using 4.7b6 and cvs upload.module v1.83. When I upload an attachment the upload graphic that shows it's uploading continues indefinitely even though my browser states the file is Done. So I ignore the fact that it looks like it's still uploading and click Submit. Then I notice that there are two versions of the file I just uploaded. Using inline.module also results in two of the file/images showing up in my story/page post even though I've only added one [inline:1] direction.

Forms API: HDI handle fields dynamically added from the client side?

I have a nicely working script that can be seen at work over in CVS to add more form fields as needed to my edit page.

I had much magic going on under 4.6, (functional demo of the relationship module but I'm having a blue hell of a time remaking that functionality under 4.7.

Pages

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