Hi I have used the following code to build a form and load the structure from XML and then populate it with a PHP file from the database…
var userSettings = mainLayout.cells("c").view("Settings");
var userSettingsForm = userSettings.attachForm("User Settings");
userSettingsForm.loadStruct("codebase/xml/forms/editUserSettingsForm.xml?e=" + new Date().getTime());
userSettingsForm.load("./data/users/editUserSettingsFormData.php?e=" + new Date().getTime());
This all works fine… so far
My issue is that when I add a combo box comboType=“image” and path to the images the option text does not display.
I am using the profession version of dhtmlx and have included the following files in my project…
<link rel="stylesheet" type="text/css" href="codebase/dhtmlx.css">
<script src="codebase/dhtmlx.js"></script>
XML Code:
<?xml version="1.0"?>
<items>
<item type="fieldset" label="User Details" inputWidth="320" offsetLeft="10">
<item type="input" label="First Name:" name="firstName" value="" required="true" validate="NotEmpty"/>
<item type="input" label="Last Name:" name="lastName" value="" required="true" validate="NotEmpty"/>
<item type="input" label="User Name:" name="userName" value="" minlength="6" required="true" validate="NotEmpty"/>
<item type="input" label="Email:" name="emailAddress" value="" required="true" validate="NotEmpty,ValidEmail"/>
<item type="template" label="Access Level:" name="role" value="" style="position: relative; top: 3px;"/>
<item type="password" label="Password:" name="loginPassword" value="" minlength="6" maxlength="16" validate="NotEmpty,minLength,matchPassword"/>
<item type="password" label="Re-Type:" name="confirmPassword" value="" minlength="6" maxlength="16" validate="NotEmpty,minLength,matchPassword"/>
</item>
<item type="newcolumn" offset="20" />
<item type="fieldset" label="General Settings" inputWidth="320">
<item type="combo" comboType="image" readonly="true" label="Avatar:" name="userAvatar" inputWidth="120">
<option value="user.png" img_src="./codebase/imgs/icons_users/user.png" >Male</option>
<option value="user_female.png" img_src="./codebase/imgs/icons_users/user_female.png">Female</option>
<option value="user_green.png" img_src="./codebase/imgs/icons_users/user_green.png">Green</option>
<option value="user_orange.png" img_src="./codebase/imgs/icons_users/user_orange.png">Orange</option>
<option value="user_red.png" img_src="./codebase/imgs/icons_users/user_red.png">Red</option>
<option value="user_suit.png" img_src="./codebase/imgs/icons_users/user_suit.png">Suit</option>
</item>
</item>
<item type="hidden" name="creationDate" value=""/>
<item type="button" value="Update" offsetLeft="79"/>
</items>
I have spent a few hours going through the forums, documentation and samples to no avail…
Please help…