Saltar para o conteúdo principal
Versão: 21 BETA

WebFormItem

The 4D.WebFormItem class allows you to handle the behavior of your Qodly webform components.

Os objetos 4D.WebFormItem são propriedades do objeto 4D.WebForm retornado pelo comando Web Form.

When you call the Web Form command, the returned 4D.WebForm proxy object holds as many 4D.WebFormItems as there are components with server-side references in your webform.

For example, WebFormObject.myImage refers to the image component with myImage as server reference.

História
ReleaseMudanças
20 R2Adicionado

Objeto WebFormItem

.addCSSClass(className : string)
adiciona a classe especificada no className ao component
.hide()
oculta o component
.removeCSSClass(className: string)
remove a classe especificada em className do componente
.show()
makes the component visible

.addCSSClass()

.addCSSClass(className : string)

ParâmetroTipoDescrição
classNamestring->Nome da classe CSS a ser adicionada ao componente

Descrição

A função .addCSSClass adiciona a classe especificada no className ao component.

.hide()

.hide()

ParâmetroTipoDescrição
Não exige nenhum parâmetro

Descrição

A função .hide() oculta o component.

Exemplo

To call a function that hides an image when the user clicks a button:

  1. Create an exposed function inside a shared singleton class named isHidden that contains the following code:

shared singleton Class constructor()
exposed Function isHidden()
var myComponent : 4D.WebFormItem

myComponent:=Web Form.myImage
myComponent.hide() // Hide the component that has "myImage" as server reference
  1. In Qodly Studio: Select the image component on the canvas, and enter a server-side reference in the Properties Panel > Server Side, for example "myImage".
  2. Select the Button component and add an onclick event to it.
  3. Attach the isHidden function to the event.

.removeCSSClass()

.removeCSSClass(className: string)

ParâmetroTipoDescrição
classNamestring->Nome da classe CSS a ser removida do componente

Descrição

A função .removeCSSClass() remove a classe especificada em className do componente.

.show()

.show()

ParâmetroTipoDescrição
Não exige nenhum parâmetro

Descrição

The .show() function makes the component visible.If the component was already visible, the function does nothing.

Veja também

Web Form
Web Event
WebForm class