I was looking at the /libs/Forms.php file, and I noticed the following
bit of code, beginning on line 597:
if (isset($form_data) and $this->edit_type != "save") {
$form .= ("
<br />
<select name=\"form_post_type\">
<option value=\"save\">Save</option>
<option value=\"insert_new\">Insert as new row</option>
</select>");
}
To me, this is saying, if the field 'Editing Type' is set to anything
aside from a value of "save", then this html select box bit gets hard
coded into the form. So, there's no way of setting "insert as new row",
if "save" is the only conditional accounted for in the code. To amend,
this, we'd just need to set up a conditional or a case situation & tell
the form to look for another type as well like "insert". Does that
sound correct?
--
You received this bug notification because you are a member of Aiki
Framework Developers, which is subscribed to aikiframework.
https://bugs.launchpad.net/bugs/834339
Title:
Aiki Forms 'Edit Type: insert_new' doesn't work
Status in Aiki Framework:
Confirmed
Bug description:
When using an Aiki Form as an edit like (#(form:edit:((id)))#), the
html page generated contains an edit type select box that has 2
options: "save" and "insert_new". The user filling out the form can
select 1 or the other to edit the actual record or to submit the edit
as a new record (retaining the previous entry in the db & assigning
the edit a new id).
This 'Edit Type" option is configurable in the Aiki Admin Panel.
If you create a new field of type "Editing Type" and assign it a value
of "save", then the generated HTML form removes the selectable Edit
Type option & automatically saves the record ontop of the existing
one.
Consequently, adding value "insert_new" should do the same thing, only
inserting a new row, as opposed to saving on top of an existing
record. The problem is that it doesn't. It works perfectly fine if
the user selects this option from the form, but it really needs to be
configurable on the back end, so this step can be removed from the
form filling process.
I've tried adding variations of "insert_new" like "insert", "new",
"insert new", "add", and nothing none have proven successful.
This is on aiki framework version: 0.8.19.843
To manage notifications about this bug go to:
https://bugs.launchpad.net/aikiframework/+bug/834339/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help : https://help.launchpad.net/ListHelp