AmpForm

Inheritance: java.lang.Object, com.aspose.email.AmpComponent

public class AmpForm extends AmpComponent

The amp-form extension allows you to create forms to submit input fields in an AMP document.

Constructors

Constructor Description
AmpForm()

Methods

Method Description
getFieldset() List of fields.
getMethod() The method attribute tells the server about the request method.
setMethod(int value) The method attribute tells the server about the request method.
getTarget() Indicates where to display the form response after submitting the form.The value must be _blank or _top.
setTarget(int value) Indicates where to display the form response after submitting the form.The value must be _blank or _top.
getAction() Specifies a server endpoint to handle the form input.
setAction(String value) Specifies a server endpoint to handle the form input.
getActionXhr() Specifies a server endpoint to handle the form input and submit the form via XMLHttpRequest (XHR).
setActionXhr(String value) Specifies a server endpoint to handle the form input and submit the form via XMLHttpRequest (XHR).
getRequiredScript() Required script that muct be added to head section.
toAmpHtml() Represents amp html version of component.
toHtml() Represents html version of component.

AmpForm()

public AmpForm()

getFieldset()

public final List<FormField> getFieldset()

List of fields.

Returns: java.util.List<com.aspose.email.FormField>

getMethod()

public final int getMethod()

The method attribute tells the server about the request method.

Returns: int

setMethod(int value)

public final void setMethod(int value)

The method attribute tells the server about the request method.

Parameters:

Parameter Type Description
value int

getTarget()

public final int getTarget()

Indicates where to display the form response after submitting the form.The value must be _blank or _top.

Returns: int

setTarget(int value)

public final void setTarget(int value)

Indicates where to display the form response after submitting the form.The value must be _blank or _top.

Parameters:

Parameter Type Description
value int

getAction()

public final String getAction()

Specifies a server endpoint to handle the form input. The value must be an https URL (absolute or relative) and must not be a link to a CDN

Returns: java.lang.String

setAction(String value)

public final void setAction(String value)

Specifies a server endpoint to handle the form input. The value must be an https URL (absolute or relative) and must not be a link to a CDN

Parameters:

Parameter Type Description
value java.lang.String

getActionXhr()

public final String getActionXhr()

Specifies a server endpoint to handle the form input and submit the form via XMLHttpRequest (XHR).

Returns: java.lang.String

setActionXhr(String value)

public final void setActionXhr(String value)

Specifies a server endpoint to handle the form input and submit the form via XMLHttpRequest (XHR).

Parameters:

Parameter Type Description
value java.lang.String

getRequiredScript()

public String getRequiredScript()

Required script that muct be added to head section.

Returns: java.lang.String

toAmpHtml()

public String toAmpHtml()

Represents amp html version of component.

Returns: java.lang.String -

toHtml()

public String toHtml()

Represents html version of component.

Returns: java.lang.String -