SilkBuilder
  • SilkBuilder
  • Development Environment
    • Development Environment
    • System Elements
    • Project, Data Model and ORM
    • Development Formats
  • Silk Builder Training
    • Sample Database
    • Plain Application
    • Easy Application
    • Simple Application
    • Complex Application
    • Report Application
    • System Environment
  • Docs
    • The ORM Structure
    • SilkBuilder
    • Silk Service
    • Java Database Class
    • Report
  • Silk Tags
    • App
    • AppHeader
    • Button
    • ButtonItem
    • Chart
    • Column
    • Content
    • DataProvider
    • DataService
    • Form
    • Group
    • Header
    • HelpBox
    • If
    • Input
    • JQcode
    • JScode
    • LogicAction
    • LogicDimension
    • LogicGrid
    • Modal
    • ModalBody
    • ModalFooter
    • Module
    • Page
    • Pagination
    • Screen
    • ScreenFooter
    • ScreenHeader
    • Tab
    • TabItem
    • Table
    • TableBody
    • TableHeader
    • TabsNav
    • Tile
  • JavaScript Objects
    • Button
    • ChartJS
    • Column
    • DataProvider
    • EventManager
    • Form
    • Input
    • Modal
    • Pagination
    • SilkPage
    • Table
    • TabsNav
    • Tile
    • Utility Functions
  • Coding Techniques
    • Data Trees
    • Pagination
    • Mark Deleted
    • Record Sync
    • Filtering Code
    • Content Template
    • Sort Data Columns
    • Form Input File
    • Button with Confirmation
    • Toggle List
    • Table Inputs
Powered by GitBook
On this page
  • Tag Definition
  • Properties
  • id*
  • dataSource
  • parentForm
  • dialog
  • dialogTitle
  • dialogPosition
  • insertBt
  • updateBt
  • deleteBt
  • cancelBt
  • submitBt
  • mode
  • buttonTarget
  • buttonTest
  • insertTitle
  • updateTitle
  • deleteTitle
  • insertMessage
  • updateMessage
  • deleteMessage
  • renderIf
  • init
  • cssClass
  • toggleList
  • toggleEdit
  • confirmTitle
  • confirmMessage
  • confirmLabel
  • confirmIcon
  • confirmTarget
  1. Silk Tags

Form

The silk:Form component serves as a data visualizer and adds the typical form to manipulate the information. It provides the interface for the user to perform tasks like adding, editing, and deleting records, connecting to the silk:Table and the silk:DataProvider.

The information collected by the Form is sent to the server using the silk:DataProvider component.

Tag Definition

Used standalone:

<silk:Form
  id=""
  dataSource=""
  parentForm=""
  dialog="true"
  dialogTitle=""
  dialogPosition=""
  insertBt=""
  updateBt=""
  deleteBt=""
  cancelBt=""
  submitBt=""
  mode="false"
  buttonTarget=""
  buttonTest=""
  insertTitle="Adding"
  updateTitle="Editing"
  deleteTitle="Deleting"
  insertMessage="Created"
  updateMessage="Edited"
  deleteMessage="Deleted"
  renderIf=""
  init="true"
  cssClass=""
  toggleList=""
  toggleEdit=""
  confirmTitle=""
  confirmMessage=""
  confirmLabel=""
  confirmIcon=""
  confirmTarget=""
/>

Used as a container:

<silk:Form
  id=""
  dataSource=""
  parentForm=""
  dialog="true"
  dialogTitle=""
  dialogPosition=""
  insertBt=""
  updateBt=""
  deleteBt=""
  cancelBt=""
  submitBt=""
  mode="false"
  buttonTarget=""
  buttonTest=""
  insertTitle="Adding"
  updateTitle="Editing"
  deleteTitle="Deleting"
  insertMessage="Created"
  updateMessage="Edited"
  deleteMessage="Deleted"
  renderIf=""
  init="true"
  cssClass=""
  toggleList=""
  toggleEdit=""
  confirmTitle=""
  confirmMessage=""
  confirmLabel=""
  confirmIcon=""
  confirmTarget=""
>
   Contains: silk:Input and HTML components.
</silk:Form>

Properties

*Required property.

id*

The Form's unique identifier. Default Value: Empty.

dataSource

The component's identifier provides the record's columns used by the form's inputs. This can be a silk:Table or a silk:DataProvider. In the case of silk:Table the Form will use the selected row record. In the case of a silk:DataProvider the form will use the the first record. If not provided, it is expected for the form's inputs to be initialize programmatically. Default Value: Empty.

parentForm

The identifier of a Form to connect to its dataSource will be used to initialize its children's input. Default Value: Empty.

dialog

Defines if the form's dialog bar containing the Submit and Cancel buttons should be displayed in editing mode. Default Value: true.

dialogTitle

Sets a title for the editing dialog when the form is editable. Default Value: Empty.

dialogPosition

Defines if the dialog will be placed at the top or the bottom of the form. Default Value: Empty.

insertBt

The name of the button that will be used to trigger an insert action. Default Value: Empty.

updateBt

The name of the button that will be used to trigger an update action. Default Value: Empty.

deleteBt

The name of the button that will be used to trigger a delete action. Default Value: Empty.

cancelBt

The name of the button that will be used to trigger a cancel action. Default Value: Empty.

submitBt

The name of the button that will be used to trigger a submit action. Default Value: Empty.

mode

Defines the initial status of the Form. If true, it will initialize as editable. It also supports the values "read" or "write." Default Value: false.

buttonTarget

A comma-separated list of pages used to place the auto-generated action buttons. These buttons will be placed in the page's header. The order is the page for the insert button, the page for the edit button, and the page for the delete button. Only including the insert page will default this page for the other buttons. Including the insert and edit page will default the edit page as the target for the delete button. Sending the value none or null for any page will not generate that button. This example will only generate the edit button: buttonTarget="none,formPage,none". Default Value: Empty.

buttonTest

insertTitle

The text to show in the dialog bar when performing an update. Default Value: Adding.

updateTitle

The text to show in the dialog bar when operating an update. Default Value: Editing.

deleteTitle

The text to show in the dialog bar when operating a delete. Default Value: Deleting.

insertMessage

The message to show after operating an insert. Default Value: Created.

updateMessage

The message to show after operating an update. Default Value: Edited.

deleteMessage

The message to show after operating a delete. Default Value: Deleted.

renderIf

init

Defines if the component will be initialized after being created. Default Value: true.

cssClass

The CSS class or classes to be added to the Form. Default Value: Empty.

toggleList

The list of comma-separated elements that will be toggled together with the component. The value "parent" toggles the immediate parent element. The value "grandpa" toggles the grandparent element. Default Value: Empty.

toggleEdit

The list of comma-separated elements that will be inversely toggled when the form is in editing mode. This is used to hide elements when the form changes to editable mode. Default Value: Empty.

confirmTitle

Sets the title of the confirmation dialog. Default Value: Empty.

confirmMessage

Sets the message to show in the confirmation dialog. Default Value: Empty.

confirmLabel

Sets the label for the accept button in the confirmation dialog. Default Value: Empty.

confirmIcon

Sets the confirmation dialog icon. Default Value: Empty.

confirmTarget

Sets which actions will trigger the confirmation dialog. Default Value: Empty.

PreviousDataServiceNextGroup

Last updated 1 day ago

Receives the logical sentences defining whether the action buttons will be added at render time. The explanation on how to use the logic statement is found in documentation. This follows the same order as the buttonTarget property but separated by a pipe symbol: "|". Default Value: Empty.

It contains the logic sentence defining whether the component should be rendered. The logic statement's explanation is in the documentation. Default Value: Empty.

Server Code Logic
Server Code Logic