I am not entirely sure what you mean in item 2, since I am not very into the framework at this point. Does it create some tables in the database for anything?
What I do need, in more detail, is for example:
1. Form for adding a new recipe:
a) Create empty form.
b) Fill empty form widgets with data: ingredient dropdowns/selects, difficulty dropdown/select, etc. Some widgets will remain empty for input.
c) Verify input on form submission.
d) Add new data in the database.
e) Clear form on success, or similar.
2. Form for editing an existing recipe:
a) Create empty form.
b) Fill a dropdown/select widget with existing recipe name. When a new recipe name is selected, fill the rest of the form with the existing data for that recipe.
c) The user changes some of the data in the form.
d) Verify input on form submission.
e) Update data in the database.
f) Clear form on success, or similar.
Currently I am using something like this to get data for my test forms:
function DB_get_recipes() {
global $wpdb;
return $wpdb->get_results(' SELECT name
FROM recipes
ORDER BY name', ARRAY_A);
}
Does this make sense for returning data to fill the form widgets?