Drop-down box with list of values. For more information, see "Edit as" settings: Lookup wizard.
Readonly
Use this format for a field that should not be edited.
ColorPicker
The Color picker control that allows users select color the same way they do in Adobe Photoshop. For more information, see "Edit as" settings: ColorPicker.
SignaturePad
The SignaturePad control allows you to add signature pad to your forms. For more information, see "Edit as" settings:
SignaturePad.
Color picker control allows users select color the same way they do in Adobe Photoshop. SignaturePad works with both mouse and touch devices. You may select ColorPicker as Edit as type for any text field and enjoy your color picker on Add/Edit pages.
edit_control_ColorPicker
Click Add initialization script button to customize the ColorPicker control.
Note that Color picker control is a custom plugin. From now on you also can create your own Edit control plugins. For more information, see How to create your own Edit control.
You may consider some additional enhancements:
1. It would be nice if instead of hex color value we can show some visual representation of selected color on List/View pages.
We'll do so choosing 'View as' type 'Custom' and putting the following code there:
$value="<span style='padding: 5px; background: ".$value."'>".$value."</span>";
2. By default PHPRunner sets focus to the first edit control when Add or Edit page is loaded. This is not a desired behaviour for colorpciker control as we do not want to see colorpicker popup window to open every time page is loaded. To prevent this from happening implement setFocus function - simply return false every time.
PHPR unner manual
Visual Editor - "Edit as" settings: Date
Date edit control. Choose between:
· simple edit box;
· simple edit box with datepic ker (inline or popup mode);
· dropdown boxes with day, month and year selec tion;
· dropdown boxes with datepic ker (inline or popup mode).
dateeditformat
You can set start and end year range. Simple edit box also allows to enter time.
Default value will be assigned to a field directly on the Add/Search pages. AutoUpdate value will be assigned to a field every time record is updated on the Edit page. You can use this feature to keep track of who and when updated the record. Default and AutoUpdate values should be valid PHP expressions.
Simple edit box with datepicker (inline mode):
datepicker
1 Dropdown boxes with datepicker (popup mode):
datepicker_popup
PHPR unner manual
Visual Editor - "Edit as" settings: File/Image
Depending on the field type this control allows uploading images and files to the database (binary field) or to some directory on the Web server (text field).
Text field
File/Image upload control allows selecting and uploading multiple files at once. You only need one database field to store all file names. For multiple file upload long text field is recommended, for example, Memo in MS Access, Mediumtext in MySQL, TEXT or Varchar(max) in SQL Server.
Since images and files will be uploaded to some directory on the server, you need to enter the path to that directory. The path should be relative to the folder with generated pages. Since some hosting providers do not allow making reference to the directories, which are above the current one, you can use the Absolute path option and specify the full path to the directory on the server, in which files will be uploaded. E.g. C:\Inetpub\WWWROOT\project1\files.
upload_options
Path to upload folder may contain PHP expression (select PHP expression option). So you do not need to write event code to save each user's files to separate folder. Sample upload path in this case is:
$folder = $_SESSION["UserID"];
Another example is when a person needs to upload files to a folder (e.g. http://mywebsite.com/files/images) and it is not possible to use relative path .. / files / images. In this case select both PHP expression and Absolute path check boxes and use the following code:
$folder = $_SERVER["DOCUMENT_ROOT"]. "/files/images";
Use the Delete file when associated record is deleted option to make sure that a file will be deleted when associated record is deleted from the database. This option is global and if enabled is applied to all tables and fields.
You can restrict the maximum number of files to store. Enter "0" for unlimited number of files. Note that default value is "1" and you need to increase it to enable multiple upload.
Enable Basic upload control option to select the old style file upload control that lets users upload one file at a time.
upload_control2
Advanced settings
edit_as_image_file
PHPRunner allows creating thumbnails on the fly. To do this, select the Create thumbnails of the fly check box and choose thumbnail size and thumbnail prefix. For example, if the original image filename is example.gif and thumbnail image filename is th_example.gif correspondingly, then thumbnail prefix is th_. Note that thumbnail images are stored in the same folder as the images.
Note: to use thumbnails functionality you need to have the GD library installed. On Windows you need to uncomment php_gd2.dll extension in your php.ini file.
To resize images on upload, select the Resize images after upload option and select max width or height of resulting image.
You can restrict the uploaded file size by setting maximum size of a single file and maximum size of all uploaded files.
Add list of file extensions allowed to upload under Allowed file types. Empty string means no restrictions.
Upload control in generated application
You can drag one or more files from your desktop right to the upload control on web page. Drag and drop feature is not supported in Internet Explorer.
upload_control
upload_control1