Saltar para o conteúdo principal
Versão: 20 R5 BETA

WebForm

The WebForm class contains functions and properties allowing to handle your Qodly webform components. This class is detailed in the Qodly documentation.

História
ReleaseMudanças
20 R6Added enableState() and disableState()
20 R2Adicionado

Comandos e funções

.componentName : [4D.WebFormItem](/docs/pt/API/WebFormItemClass)
objects that are available directly as properties

| .disableState( state : string)
disables the rendering of the state in the current web form | | .enableState( state : string )
enables the rendering of the state in the current web form | | .setError( msg : string)
sends msg as an error message to the web form | | .setMessage( msg : string)
sends msg as an information message to the web form | | .setWarning( msg : string)
sends msg as a warning message to the web form | | Web Form : 4D.WebForm
returns a 4D.WebForm proxy object that allows you to interact with the web form | | Web Event : object
returns an object with information on a triggered event linked to a webform component |

.componentName

.componentName : 4D.WebFormItem

Descrição

The components of webforms are objects that are available directly as properties of these webforms.

For more information, please refer to the .componentName description in the Qodly documentation.

.disableState()

.disableState( state : string)

ParâmetroTipoDescrição
statestring->Name of state to disable from the web form

Descrição

The .disableState() function disables the rendering of the state in the current web form.

This function does nothing if:

  • the state is currently not enabled in the web form,
  • the state does not exist for the web form.

If you enable or disable several states in the same user function, all modifications are sent at the same time to the client once the function ends.

For more information on web form states, please refer to developer.qodly.com.

.enableState()

.enableState( state : string )

ParâmetroTipoDescrição
statestring->Name of state to enable on the web form

Descrição

The .enableState() function enables the rendering of the state in the current web form.

This function does nothing if:

  • the state has already been enabled on the web form,
  • the state does not exist for the web form.

If you enable or disable several states within the same user function, all modifications are sent at the same time to the client once the function ends.

For more information on web form states, please refer to developer.qodly.com.

Exemplo

You enable a specific state named "wrongCredentials" in case of error in your login page:

Function authenticationError()
If (Session.info.type#"remote")
Web Form.enableState("wrongCredentials")
End if

.setError()

.setError( msg : string)

ParâmetroTipoDescrição
msgstring->Mensagem de erro a ser exibida no formulário Web

Descrição

The .setError() function sends msg as an error message to the web form.

For more information, please refer to the .setError() description in the Qodly documentation.

.setMessage()

.setMessage( msg : string)

ParâmetroTipoDescrição
msgstring->Mensagem informativa a ser exibida no formulário Web

Descrição

The .setMessage() function sends msg as an information message to the web form.

For more information, please refer to the .setMessage() description in the Qodly documentation.

.setWarning()

.setWarning( msg : string)

ParâmetroTipoDescrição
msgstring->Mensagem de aviso a ser exibida no formulário Web

Descrição

The .setWarning() function sends msg as a warning message to the web form.

For more information, please refer to the .setWarning() description in the Qodly documentation.

Web Form

Web Form : 4D.WebForm

ParâmetroTipoDescrição
Resultados4D.WebForm<-New WebForm proxy object

Descrição

The Web Form command returns a 4D.WebForm proxy object that allows you to interact with the web form.

For more information, please refer to the webForm command description in the Qodly documentation.

Web Event

Web Event : object

ParâmetroTipoDescrição
Resultadosobject<-object

Descrição

The Web Event command returns an object with information on a triggered event linked to a webform component.

For more information, please refer to the webEvent command description in the Qodly documentation.