Ch 4 Forms - errata
p. 91 & 92 - file reference "src/component/administrator/com_spm/forms/..." is wrong - should be
"src/component/admin/forms/..."
p. 91 - in src/component/admin/forms/project.xml, editor field type missing filter=“safehtml” element
p. 92 - in src/component/admin/forms/project.xml, the logo field is missing name=“logo” element
p. 93 - in src/component/admin/forms/task.xml, the field “id_project” is missing all the sql field type elements.
p. 94 - in getOptions(), $query->select(’ip.id,...’ should be 'id' - not 'ip.id', and order->'name' not 'p.name' - provided code is correct
p.95 - subform file name wrong -
Let’s start by adding the subform definition to the src/component/admin/forms/forms.xml file -
file name is Let’s start by adding the subform definition to the src/component/admin/forms/project.xml
p.97 - Let’s add some validation to our Client edit form. So in the src/component/admin/forms/
client.xml file, replace the email field definition - Customer, not Client, e.g. customer.xml
p. 98 - we must edit the .tmpl file at /src/component/admin/tmpl/client/edit.php - /customer/ not /client/
p. 100 - src/component/admin/forms/client.xml - should be customer.xml
p. 100 - in provided code src/component/admin/forms/customer.xml,
<field
name="email"
type="text" ...
should be
<field
name="email"
type="email" ....
Ch 4 Forms - errata p. 91 & 92 - file reference "src/component/administrator/com_spm/forms/..." is wrong - should be "src/component/admin/forms/..." p. 91 - in src/component/admin/forms/project.xml, editor field type missing filter=“safehtml” element p. 92 - in src/component/admin/forms/project.xml, the logo field is missing name=“logo” element p. 93 - in src/component/admin/forms/task.xml, the field “id_project” is missing all the sql field type elements. p. 94 - in getOptions(), $query->select(’ip.id,...’ should be 'id' - not 'ip.id', and order->'name' not 'p.name' - provided code is correct p.95 - subform file name wrong - Let’s start by adding the subform definition to the src/component/admin/forms/forms.xml file - file name is Let’s start by adding the subform definition to the src/component/admin/forms/project.xml p.97 - Let’s add some validation to our Client edit form. So in the src/component/admin/forms/ client.xml file, replace the email field definition - Customer, not Client, e.g. customer.xml p. 98 - we must edit the .tmpl file at /src/component/admin/tmpl/client/edit.php - /customer/ not /client/ p. 100 - src/component/admin/forms/client.xml - should be customer.xml p. 100 - in provided code src/component/admin/forms/customer.xml, <field name="email" type="text" ... should be <field name="email" type="email" ....