about form issue
LeiZhang-Hunter opened this issue · comments
<html>
<head>
<title>Test</title>
<style>
form { flow:row(label,input); }
form > label {white-space:nowrap;}
form [required].error { border-right:0.25em red solid; }
</style>
</head>
<body>
<form action="form.html">
<label>First name:</label><input|text(first) required title="Must not be empty">
<label>Second name:</label><input|text(second) required=".{2,}" title="Please enter 2 characters or more." >
<button|submit #set>Submit</button>
</form>
</body>
</html>
i can't receive form data,when SciterViewCallback(SC_LOAD_DATA) ,why
In order to get extended data of a request you should use Request API
SCN_LOAD_DATA pld = ...
HREQUEST rid = pld->requestId;
rapi()->RequestGetNumberOfParameters(rid,...);
rapi()->RequestGetNthParameterName(rid,...);
rapi()->RequestGetNthParameterValue(rid,...);
Another option is to handle and consume FORM_SUBMIT
event.
Its BEHAVIOR_EVENT_PARAMS::data
will contain name/value map of submitting parameters.
If you consume the event then no SC_LOAD_DATA request is generated.
thanks for your help,I wish you could be better and better,bye.