CreatorsClient exports
OpenForm
Last updated on
Opens an OPX form owned by your resource on the local player's screen.
local res = exports.opx_infinity:OpenForm(spec)Sync. The submit or cancel reaches your reply export as opx:on:form:answer with the form's answer.
Parameters
- spec:
table— the form spec withoutowner/on- reply?:
string— the export your answer goes to
- reply?:
Returns
{ handle, id, fields }
Errors
form_busy(another form is open), spec errors,export.callerDenied,export.badArgument,error.unavailable(module not running)
local res = exports.opx_infinity:OpenForm({
title = 'Order',
fields = { { id = 'qty', label = 'Quantity', slider = { min = 1, max = 10, step = 1 } } },
})