Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
c

RenderedForm

class RenderedForm

A semantic view of one form in a parsed disconnected-render snapshot.

Field accessors inspect rendered markup only. Submission requires explicit FormData and does not dispatch bindings or construct a browser's successful-controls data set.

Defined by scalive.testing.RenderedForm. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:141-222)

Methods10

action

def action: Option[String]

Returns the parsed, unresolved action attribute.

Defined by scalive.testing.RenderedForm.action. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:149-149)

fields

def fields: Vector[testing.RenderedField]

Returns named descendant controls in DOM order.

Defined by scalive.testing.RenderedForm.fields. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:156-159)

hasChangeBinding

def hasChangeBinding: Boolean

Reports whether the form has a phx-change attribute.

Defined by scalive.testing.RenderedForm.hasChangeBinding. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:173-173)

hasSubmitBinding

def hasSubmitBinding: Boolean

Reports whether the form has a phx-submit attribute.

Defined by scalive.testing.RenderedForm.hasSubmitBinding. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:176-176)

id

def id: Option[String]

Returns the parsed id attribute, preserving absent versus present-empty.

Defined by scalive.testing.RenderedForm.id. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:146-146)

method

def method: zio.http.Method

Returns POST for a case-insensitive post attribute and GET otherwise.

Defined by scalive.testing.RenderedForm.method. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:152-153)

names

def names: Vector[String]

Returns every selected field name, retaining duplicates and DOM order.

Defined by scalive.testing.RenderedForm.names. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:162-162)

submit

def submit[R](routes: zio.http.Routes[R, Nothing], data: FormData, submitter: Option[FormSubmitter] = ...): zio.ZIO[R, Throwable, testing.RenderedPage]

Submits explicit ordered fields to this form's local ordinary HTTP action.

The caller supplies the complete successful-control payload, including any rendered CSRF field. An optional submitter is appended after those fields. GET submission replaces the action query. POST submission retains the query and supports only application/x-www-form-urlencoded. Cookies accumulated by the source page are included.

Defined by scalive.testing.RenderedForm.submit. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:188-218)

triggersAction

def triggersAction: Boolean

Reports whether the form has a phx-trigger-action attribute.

Defined by scalive.testing.RenderedForm.triggersAction. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:179-179)

values

def values(name: String): Vector[String]

Returns Jsoup values for fields whose parsed name exactly equals name.

Defined by scalive.testing.RenderedForm.values. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:165-166)

def values(path: FormPath): Vector[String]

Returns values for the browser-style name rendered by path.

Defined by scalive.testing.RenderedForm.values. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:169-170)