You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following is the code in alpaca.js version 1.5.27 Line number 24336 to 24344
Any one know the reason to not include the field that is dependent on hidden field although hidden field value included in the value
I think following check should be removed.
//
// NESTED HIDDENS DEPENDENCY HIDES (ALPACA EXTENSION)
//
// final check: only set valid if the dependentOnPropertyId is showing
if (dependentOnField && dependentOnField.isHidden())
{
valid = false;
}
return valid;
as per following example field2 value is not included in the alpaca.getValue() and getting value as {'field1': 'Value1'} instead of {'field1': 'Value1', 'field2': '100'}
var alpaca = $('#form').alpaca();
var value = alpaca.getValue();
Here is the json schema:
{
"$schema":"https://json-schema.org/draft/2020-12/schema",
"$id":"https://gso.org.sa/aajel/api/json/schema?version=1",
"description":"Here is custom form generated by json schema using alpaca",
"type":"object",
"dependencies": {
"field2": ["field1"]
},
"properties":{
"field1": {
"type":"string",
"enum":[
"Value1",
"Value2"
]
},
"field2":{
"type":"string",
"enum":[
"100",
"200",
"300",
"400"
]
}
}
}
Following is the code in alpaca.js version 1.5.27 Line number 24336 to 24344
Any one know the reason to not include the field that is dependent on hidden field although hidden field value included in the value
I think following check should be removed.
as per following example
field2
value is not included in thealpaca.getValue()
and getting value as{'field1': 'Value1'}
instead of{'field1': 'Value1', 'field2': '100'}
Here is the json schema:
Here is the options:
The text was updated successfully, but these errors were encountered: