there is SQLFORM.factory and FORM for you is you are without a schema. and 
some custom javascript to show/hide/create the additional inputs (if the 
user "can", it might be fit to show him some sort of "basic" and "advanced" 
form upon request,e.g. pressing a button).

On Sunday, August 26, 2012 6:59:10 PM UTC+2, apps in tables wrote:
>
> The example of the recipes is perfect. Please, let me add some spices.
>
> In the beginning, the recipes system is one table recipe and two fields 
> (name and description) and one form...life was good.
>
> Then the decision has been made to add the following schema features:
>
>  adding 10 optional fields (can be null) 
>
>  each recipe can have a list of nutrition facts 
>
>  each recipe can have a list of ingredients (another recipe)
>
> in two forms ( recipes and nutrition facts).
>
> I know how to do all these features using DAL and web2py.
> the only difficulty (for me) is in developing the form recipes (using one 
> controller and one view).
>
> I want to have the recipes form as follows:
>
> the two mandatory fields ( name , description) are shown (displayed to be 
> filled)
>
>  the user decides if he likes to add any of the ten optional fields ( he 
> may choose none, so, none will be shown)(this is different from listing the 
> ten fields and then he fills some and leaves some)
>
> the user can expand the nutrition facts button to display the list of 
> nutrition of the recipe (he can add nutrition), in the same form.
>
>  the user can expand the ingredients button to display the list of 
> ingredients of the recipe (he can add ingredient), and he can get the 
> ingredient details, because it is a recipe...the last level is recipe with 
> no ingredient(like tomato)..all of this in the same form.
>
>
> This form seems similar  to folder, subfolder and files ( tree).
>
> How do i build this one form (view) ?
> is there any web2py example similar?
>  
> Regards,
>
> Ashraf
>
>
>
>

-- 



Reply via email to