Hello.
I want to add a new field in a module. I have the file Bx...FormAdd.php and in it this code:
'wohnflaeche' => array(
'type' => 'text',
'name' => 'wohnflaeche',
'caption' => _t('_kwm_pflegestellen_form_caption_wohnflaeche'),
'required' => false,
'db' => array (
'pass' => 'Xss',
),
'display' => true,
),
Now I want a field, that is a checkbox and one must be a select form from predefined-values.
First - Checkbox:
I think the 'type' must be checkbox, but what format is the databasefield? What is writing in the database? When I have 'type' => 'checkbox' the database is empty...
Second - Select:
There is a 'type' select_box.... But how I give it the values from predefinded values?
Can anybody help?
Rappi
P.S.
Give it a list of all 'type's ans 'pass'es????
Bezirzer.de, elbrocker.de, tierschutz-community.de |
I have not seen a tutorial on Dolphin 7 forms but the Dolphin 8 form Tutorial from 2011 is close and can be of some help in understanding Dolphin forms.
http://www.boonex.com/n/dolphin-8-form
Geeks, making the world a better place |
Thanks geek_girl!
That's a great tutorial!
But with select I have a new question:
In this tutorial saying:
values - serialized array of available values, or reference to predefined set of values.
How can I insert a predefined list????
I have tested with:
'values' => 'Haus;Wohnung',
but it's not working 
Any solutions?
Bezirzer.de, elbrocker.de, tierschutz-community.de |
Hmmm..
At the checkbox I have insert:
'p11' => array(
'type' => 'checkbox',
'name' => 'p11',
'value' => 'Ja',
'caption' => _t('_kwm_pflegestellen_form_caption_p11'),
'required' => false,
'display' => true,
),
Nothing is saved, when checked....
Bezirzer.de, elbrocker.de, tierschutz-community.de |
First of all, that tutorial is an old Dolphin 8 2011 tutorial, it is not meant to be a definitive guide for Dolphin 7.
You have to fetch the vales of the predefined list from the database. Best way to learn form coding is to look at the various forms in Dolphin that populate dropdown select boxes from predefined lists.
Geeks, making the world a better place |
I've got it!
Checkbox is working 
'p11' => array(
'type' => 'checkbox',
'name' => 'p11',
'value' => 'Ja',
'checked' => $aDataEntry['p11'],
'caption' => _t('_kwm_pflegestellen_form_caption_p11'),
'required' => false,
'db' => array (
'pass' => 'Xss',
),
'display' => true,
),
But with the select I will test again....
Bezirzer.de, elbrocker.de, tierschutz-community.de |
You have to fetch the vales of the predefined list from the database. Best way to learn form coding is to look at the various forms in Dolphin that populate dropdown select boxes from predefined lists.
That is what I do 
But I don't have found a module, that uses predefined values 
Only values from categories.
Can you say me, what module use predefined values in it?
Bezirzer.de, elbrocker.de, tierschutz-community.de |
Open the file modules/boonex/groups/classes/BxGroupsFormAdd.php
Look at lines 7, 75-76, 187-197
The above will show how the Groups module uses predefined list to show countries select box.
Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz |
Tat's it!!!!
Many thanks.

Bezirzer.de, elbrocker.de, tierschutz-community.de |