Hello,

 

I have build a module first for a specific form in Orchard.

 

the model doesn't store anything, it just calculates a value from 4 form
input fields:

 

  public class Leenbedrag
  {
    [Required]
    [DisplayName("Netto Maandinkomen")]
    public double TotaalInkomen { get; set; }

         ....

 

then i use in the home view :

 

@{Html.BeginForm("Bereken", "", FormMethod.Post, new { id = "leenbedrag" });
}

 

and:

 

@(Html.TextBoxFor(m => m.TotaalInkomen, new {@class = "display" }))

 

 

Then I decided that I needed a widget, just to make it possible to show the
form anywhere in the site

 

The Leenbedrag class is used in the shape...

 

        protected override DriverResult Display(

            MaxlenenWidgetPart part, string displayType, dynamic
shapeHelper)

        {

            return ContentShape("Parts_MaxlenenWidget",

                () => shapeHelper.Parts_MaxlenenWidget(

                    Startbedrag: part.Startbedrag ?? 25000,

                    leenbedrag : new Leenbedrag()));

        }

 

How to use the leenbedrag now in my  View Part?

 

@(Html.TextBoxFor(m => m.TotaalInkomen, new {@class = "display" }))

 

should be something like:

 

@(Html.TextBoxFor(m => m.leenbedrag.TotaalInkomen, new {@class = "display"
}))

 

??

 

Met vriendelijke groet,

Jeroen Bakker

Fibonacci

[email protected]

http://www.fibonacci.nl

0229-544446

06-55176260

 



---
You are currently subscribed to orchard-discuss as: [email protected].
To unsubscribe send a blank email to [email protected].

Reply via email to