ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Automatically detect required and optional fields in a form (Feature #208)


Added by Eric Davis at 2011-02-19 02:05 am. Updated at 2011-03-18 11:37 pm.


Status:Open Start date:2011-03-19
Priority:Normal Due date:2011-03-19
Assignee:- % Done:

0%

Category:-
Target version:-
Remote issue URL: Affected version:

Description

Instead of have required fields hardcoded in the views with the red asterisks, I propose we change the forms so required fields are detected automatically from the models.

This will let custom fields and plugins add fields to forms and automatically know if something is required. It will also reduce the amount of duplication in the views.


Associated revisions

Revision 0beafecd
Added by Jean-Philippe Lang at 2008-02-03 05:21 pm

Fixed #208: Issue list does not scroll up when you click next

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1114 e93f8b46-1217-0410-a6f0-8f06a7374b81

History

Updated by Holger Just at 2011-02-19 09:10 am

This could be solved when we globally switch to some form-generating method, like formtastic (or something other). This would have the added benefit that views wouldn't have to be hardcoded anymore which would boost extensibility by a large amount.

Updated by Felix Schäfer at 2011-02-19 11:48 am

Holger Just wrote:

This could be solved when we globally switch to some form-generating method

Agreed. Eric, didn't you have something in progress/ready for that?

Updated by Eric Davis at 2011-02-19 11:11 pm

Yea I used formtastic on my contracts plugin. The views were quite nice (though long because of complex objects, states, and STI). An example.

Someone also recommend I look into simple_form. It's a lot like formtastic but less opinionated. I haven't had the opportunty to prototype it in a plugin yet.

Updated by Ian Freeman at 2011-02-20 01:26 am

Less opinionated is good, more freedom for markup.

Also available in: Atom PDF