Hello @kiat87
There are some issues in your form:
First, the names of fields “Lunar Age of Mother” and “What Lunar month was baby conceived in?” are the fieldname3 and fieldname4, respectively, so, in the equation, the correct would be:
return db[fieldname3][fieldname4];
and not with the fieldname1 and fieldname2 fields.
Second, in javascript the correct single quote symbol is '
:
var db = {
1:{1:'male', 2:'female', 3:'female', 4:'female'},
2:{1:'male', 2:'male', 3:'male', 4:'female'}
};
Third, in the db object you should use the real values of fields, for example, the values of fieldname3 are: 18, 19, 20, until 45, and the values of fieldname4: 1, 2, 3, until 12
Best regards.