21282 Posts in 5730 Topics by 2601 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 546 Views |
-
Resizing an image within a form

1 July 2010 at 9:20pm
Hi there
How can I resize an image inside a form?
Suppose I would like to do something like this:
function ImageForm()
{
$Employee = Employee::currentUser();
$Image = $Employee->Picture();
$form = new Form($this, "Form",
new FieldSet(
new LiteralField(''myLiteralField", $Image->paddedResize(200,200)
),
new FieldSet(
new FormAction ($action = "myAction", $title = "Save")
),
new RequiredFields());
//I know there is actually no formfields in this form, this is just an example...
return $form;
}Thanks, Joel
| 546 Views | ||
|
Page:
1
|
Go to Top |

