mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
115 lines
3.7 KiB
115 lines
3.7 KiB
@page
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components
|
|
@model DynamicFormsModel
|
|
|
|
@{
|
|
ViewData["Title"] = "Forms";
|
|
}
|
|
|
|
<h2>Dynamic Forms</h2>
|
|
|
|
<h4># Dynamic Form Example</h4>
|
|
|
|
<div class="demo-with-code">
|
|
<div class="demo-area">
|
|
<abp-dynamic-form abp-model="@Model.PersonInput"/>
|
|
<hr />
|
|
<h5>Posted Values:</h5>
|
|
<div>
|
|
Name: @Model.PersonInput.Name <br />
|
|
City: @Model.PersonInput.City <br />
|
|
Phone.Name: @Model.PersonInput.Phone.Name <br />
|
|
Phone.Number: @Model.PersonInput.Phone.Number <br />
|
|
Day: @Model.PersonInput.Day.ToString("yyyy-MM-dd") <br />
|
|
Country: @Model.PersonInput.Country <br />
|
|
IsActive: @Model.PersonInput.IsActive <br />
|
|
</div>
|
|
</div>
|
|
<div class="code-area">
|
|
<pre>
|
|
<abp-dynamic-form abp-model="Model.PersonInput" asp-antiforgery="true"/>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<h4># Override an input Example</h4>
|
|
|
|
<div class="demo-with-code">
|
|
<div class="demo-area">
|
|
<abp-dynamic-form abp-model="@Model.PersonInput">
|
|
<abp-input asp-for="@Model.PersonInput.Phone.Number" label="Phone Number" />
|
|
</abp-dynamic-form>
|
|
<hr />
|
|
<h5>Posted Values:</h5>
|
|
<div>
|
|
Name: @Model.PersonInput.Name <br />
|
|
City: @Model.PersonInput.City <br />
|
|
Phone.Name: @Model.PersonInput.Phone.Name <br />
|
|
Phone.Number: @Model.PersonInput.Phone.Number <br />
|
|
Day: @Model.PersonInput.Day.ToString("yyyy-MM-dd") <br />
|
|
Country: @Model.PersonInput.Country <br />
|
|
IsActive: @Model.PersonInput.IsActive <br />
|
|
</div>
|
|
</div>
|
|
<div class="code-area">
|
|
<pre>
|
|
<abp-dynamic-form abp-model="Model.PersonInput">
|
|
<abp-input asp-for="Model.PersonInput.Phone.Number" label="Phone Number" />
|
|
</abp-dynamic-form>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<h4># Form with Button Example</h4>
|
|
|
|
<div class="demo-with-code">
|
|
<div class="demo-area">
|
|
<abp-dynamic-form abp-model="@Model.PersonInput" submit-button="true"/>
|
|
<hr />
|
|
<h5>Posted Values:</h5>
|
|
<div>
|
|
Name: @Model.PersonInput.Name <br />
|
|
City: @Model.PersonInput.City <br />
|
|
Phone.Name: @Model.PersonInput.Phone.Name <br />
|
|
Phone.Number: @Model.PersonInput.Phone.Number <br />
|
|
Day: @Model.PersonInput.Day.ToString("yyyy-MM-dd") <br />
|
|
Country: @Model.PersonInput.Country <br />
|
|
IsActive: @Model.PersonInput.IsActive <br />
|
|
</div>
|
|
</div>
|
|
<div class="code-area">
|
|
<pre>
|
|
<abp-dynamic-form abp-model="Model.PersonInput" submit-button="true"/>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<h4># Non-dynamic Form </h4>
|
|
|
|
<div class="demo-with-code">
|
|
<div class="demo-area">
|
|
<form method="post">
|
|
<abp-input asp-for="@Model.PersonInput.Name"/>
|
|
<abp-select asp-for="@Model.PersonInput.Country" label="Where Do you live?"/>
|
|
<abp-input asp-for="@Model.PersonInput.Phone.Number"/>
|
|
</form>
|
|
<hr />
|
|
<h5>Posted Values:</h5>
|
|
<div>
|
|
Name: @Model.PersonInput.Name <br />
|
|
Country: @Model.PersonInput.Country <br />
|
|
Phone.Number: @Model.PersonInput.Phone.Number <br />
|
|
</div>
|
|
</div>
|
|
<div class="code-area">
|
|
<pre>
|
|
<form method="post">
|
|
<abp-input asp-for="Model.PersonInput.Name"/>
|
|
<abp-input asp-for="Model.PersonInput.Country" label="Where Do you live?"/>
|
|
<abp-input asp-for="Model.PersonInput.Phone.Number"/>
|
|
</form>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|