The better forms help you with your most common form customization needs.

Better forms is a light-weight module that allows you to customize CCK forms. It is designed for basic user who would like to do things like:

  • Redirect a form to a View, Node or a specific content type
  • Change text shown on the submit button
  • Hide: body field, Publishing options, book, revision information, menu setting, URL path settings, from the node/add form display
  • Selectively hide either the Preview button or the Delete button (or both)

The sandbox page is here:
http://drupal.org/sandbox/POETS/1229340

The two closest modules in terms of functionality seem to be Advanced Form:
http://drupal.org/project/advancedform

and Formfilter:
http://drupal.org/project/formfilter

Comments

jrowny’s picture

This functionality exists in Display Suite via Node Display in 6.x, included in DS for 7.x. See extensive documentation here: http://drupal.org/node/644662

chaosmind’s picture

This module allows one to edit the /node/add forms for all "Create content" pages without editing the tpl.php files.

We set out to create a simple GUI for content editors to streamline the content creation process, by hiding certain fields and either renaming or outright removing certain buttons in the form.

jrowny’s picture

It's a really great feature. But this is exactly what Display Suite and Node Display allow you to do. You can completely customize node forms for any "create content" page without any editing. There are several screen casts and it's one of the most well documented modules. DS and ND also allow you to customize the output of your nodes and a bunch of other neat features as well.

Oh, and you can also move form elements into Regions which is one of my favorite features.

metajon’s picture

This module allows for the customization of "/node/add" itself. I've looked through the DS documentation and sat through a few videos, and haven't come across this functionality. Additionally, a visit to the issue queue found a request for this functionality; a request which has been denied as outside the scope of DS. Consider: http://drupal.org/node/912276

I'd be just as happy to be wrong here, but if this functionality is part of DS, I'm missing it.

I'd also like to mention that I think there are cases where a smaller, more focused, module is better suited to a site than one as comprehensive as DS even _if_ there is some overlap in features.

jrowny’s picture

You're right, I was thinking of NodeFormCols. I usually install the two together since DS+ND customize the output, NodeFormCols customizes the input. Are there features in your module missing from NodeFormCols? see: http://drupal.org/node/378616 and the interface for NodeFormCols is pretty easy. Drag and drop position customization, check to hide, and the best part is that you can assign form elements to regions. NodeFormCols doesn't assign to "theme" regions, but rather its own layout of regions that way its not tied down to the theme. Another cool module to checkout is: http://drupal.org/project/custom_formatters. Between those two, and CSS, I think you can pretty much do anything with Drupal Forms.

klausi’s picture

Status: Needs review » Needs work

* Please list the related modules on your project page and what they do differently
* Git release branch is missing, see http://drupal.org/node/1015226
* Remove LICENSE.txt, it is added by drupal.org packaging automatically
* Remove all old CVS $id tags form your files, not needed anymore
* lines in README.txt should not exceed 80 characters
* info file: remove everything below "System version control by POETS", this information is added by drupal.org packaging
* better_forms_schema(): $schema should be indented 2 spaces in the function body.
* module: @file doc block is missing, see http://drupal.org/node/1354#files
* Hook implementation doc blocks are not correct, see http://drupal.org/node/1354#hookimpl
* "switch ($page)" do not use switch() if there is only one case. An if statement should do it.
* Fix the doc blocks on all functions
* indentation of CSS files should be 2 spaces, see http://drupal.org/node/302199

charlesromer’s picture

Thank you so much for your excellent feedback. We are working on all the changes that you advised.

charlesromer’s picture

Status: Needs work » Needs review
misc’s picture

Status: Needs review » Needs work

I think we still need to clarify if your module adds something that you could not do with Node form columns and Better formatters?

charlesromer’s picture

StatusFileSize
new73.78 KB
charlesromer’s picture

Issue summary: View changes

Better forms description updated

charlesromer’s picture

Status: Needs work » Needs review

Hi there, we are updating better forms documentation. I hope the new documentation answer your questions. Thank you for your observations.

charlesromer’s picture

Issue summary: View changes

Better forms description updated

charlesromer’s picture

Issue summary: View changes

Updating description

misc’s picture

StatusFileSize
new25.92 KB

What are the difference between Better Forms and Advanced Form and Formfilter?

Manual review:
You should remove

 ****************************************
 * System: Better Forms
 * Department: POETS
 * Coder: Carlos Romero-Julio
 * @file
 ****************************************

From the files, this information could instead be in the README.txt instead.

If you want an empty line, you should not use t() on it

      $output .= '<p>' . t('') . '</p>';

Why do you have an empty $flg_sql = '';?

You have some coding standards issues, see the attached file.

misc’s picture

Status: Needs review » Needs work
charlesromer’s picture

Assigned: Unassigned » charlesromer
Status: Needs work » Needs review

Hi Misc,

Thank you once again for you excellent observations. We sanitized the code, and so far we don't have errors. The differences that better forms has compared with other modules are:
* End-user don't need to have that much knowledge to add forms to better forms
* It's very easy to maintain
* Works with most themes

We tried Advanced Form and unfortunately it broke our themes, and Formfilter had problem with CCK custom fields grouping hiding fields.
I know that there are lots modules that do similar tasks but we don't want an elephant module to fix an ant problem.
Better Form is a set of tools that allow users to create a loop with a CCK form easily. For example, if we need a form for inventory this can be redirected to a view after submitting the form, so we can see right away the status of the information.
Another thing that I would like to mention is that users who have more admin permission don't want to see extra fields as menu settings, publishing options, book, revision information, etc. They just want a clean form and easy to input the data. It takes very little time to customize a form.
I hope this explanation helps to put the better forms on full project access. We strongly believe that this module can help others solve tedious problems as it did for us.

Thank you! :)

patrickd’s picture

Assigned: charlesromer » Unassigned

Please don't assign your own application to yourself, only the current reviewer should do this

charlesromer’s picture

Ok, Thank you! :)

s_gupta_14’s picture

StatusFileSize
new3.03 KB

* Menu item titles and descriptions should NOT be enclosed within t() refer Drupal Docs
* Line Indentation and spacing (See the attached file for that)
* Function comment format (See the attached file for that)
* better_form.module line 236: There should be a space after and before the dot(.) operator
* Use st() instead of t() in hook_install(), hook_uninstall() and hook_update_N() refer this link for the details

misc’s picture

@s_gupta_14, I think you missed to attach the file.

s_gupta_14’s picture

StatusFileSize
new3.03 KB

Oh I am so sorry i missed it here's the attachment below

charlesromer’s picture

We have updated the better forms according to your suggestions.

Thank you for your observations.
;-)

patrickd’s picture

Status: Needs review » Closed (duplicate)

I think the discussion whether this module is too similar to others was interrupted too early here.

It seems that
Advanced form https://drupal.org/project/advancedform
Node and Comment form settings https://drupal.org/project/nodeformsettings
jammer https://drupal.org/project/jammer
formfilter https://drupal.org/project/formfilter
provide very similar functionality. And that are already LOTS of module's (probably more I did not find)..

Duplication already is a big problem on d.o and we prefer collaboration over competition.

If the differences between these modules are not too fundamental for patching any of the existing ones, we would love to see you joining forces and concentrate all power on enhancing one module. (If the existing module is abandoned, please think about taking it over).

I think the Node and Comments Form Settings module has a very similar target and already has lots of different features, also I think the features your module provides more are not too fundamental for simply patching the existing one.

Sorry, I know you're already waiting here a while but this would really be the best way to go without creating yet another form altering module.

Feel free to reopen if you disagree

charlesromer’s picture

Status: Closed (duplicate) » Needs review

Hi Patrickd,

Thank you for checking the Better Forms module, as you can see it has been a long wait.
We did our homework with Better Forms. Before we started building the module we searched for modules that fulfill our needs. Unfortunately we didn’t find one that worked for us. We follow all the standards and rules as advised. So my question right now is “Why don’t let the module go full project access?” As you mentioned there are lots of modules that do similar tasks, but I strongly believe that the Drupal end-users should be the one who should decide. We are not trying to compete with anyone, we are trying to help. It would be great if we have the 5 stars module in Drupal.org, so users can give feedback about modules that work for them. Also a better search, because as you can see there is lots of duplicity because it’s very hard to find a module sometimes. We are more than happy to help to solve this matter if someone in the community points us in the right direction.

Cheers! :)

klausi’s picture

Assigned: Unassigned » klausi
klausi’s picture

Assigned: klausi » Unassigned
Status: Needs review » Needs work

There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732

manual review:

  1. better_forms_renderdisplay(): you can directly use drupal_get_form as page callback in hook_menu(), then you don't need that function.
  2. better_formsdisplay(): $flg_option is undefined?
  3. notice: Undefined variable: type in /home/klausi/workspace/drupal-6/sites/all/modules/better_forms/better_forms.module on line 93.
  4. notice: Undefined variable: type in /home/klausi/workspace/drupal-6/modules/node/node.module on line 456.
  5. notice: Undefined variable: flg_option in /home/klausi/workspace/drupal-6/sites/all/modules/better_forms/better_forms.module on line 106. please enable PHP notices in your development environment.
  6. "t(filter_xss('Form <strong> %updated </strong> has been updated'), array('%updated' => arg(5)));": t() will sanitize variables with "%"for you, so no need for filter_xss() here. Also elsewhere.
  7. "$flg_mode = 'Add Form';": all user facing text must run through t() for translation. Also elsewhere.
  8. better_forms_submit(): use drupal_write_record() here and you get schema validation for free.

We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

charlesromer’s picture

Status: Needs work » Needs review

Hi Klausi,

Thank you for reviewing the Better Forms module. We made the changes as you advice. We didn't do the number 8 point because the db_query is giving us a better control at this time.
We are having some struggles to rename or delete the branch Master. The branch empty right now, we follow all the instruction to fix that problem but still is not solved. Any advice about it?
We are more than happy to help to review modules, please let us know if you have any module as priority to be check/review.

Cheers :-D

charlesromer’s picture

Hi Klausi,

We fixed the branch problems.

Thank you! :-)

cubeinspire’s picture

Status: Needs work » Needs review

1. You can delete the master branch as follow:

git checkout 7.x-1.x
git branch -D master
git push origin :master

Read again http://drupal.org/empty-git-master for more info.

2. You should add t() so your module can be translated if required.
I see is not done on line 65 of the module file. I see also missing t() on descriptions and titles.
Check if there are other text string without t().

3. Do you need to check_plain() the node types on line 87 ?

4. Do you need to check_plain() the user entered values on line 136 ?
Check other user entered values before output.

5. Do you need to check if module_exists('node') as this is a core required module that cannot be un-installed ?

6. The note you add at the end of the module file should be also on the README.txt and the project page as it seems to be important and not all people will open the .module file.

7. It would be better if you mention the Drupal required version on this issue node.

cubeinspire’s picture

Status: Needs review » Needs work

changing to needs work

klausi’s picture

Status: Needs review » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

klausi’s picture

Issue summary: View changes

minor edit. Added some clarifying language.