// appends an ExtendedDocument::createElementInputCheckbox() as a child of this document (see there for params)
// returns the new child
//
+ // function appendInputFile($name, $id, $accept)
+ // appends an ExtendedDocument::createElementInputFile() as a child of this document (see there for params)
+ // returns the new child
+ //
// function appendInputSubmit($value)
// appends an ExtendedDocument::createElementInputSubmit() as a child of this document (see there for params)
// returns the new child
// returns an ExtendedElement that is an HTML <input> of type 'checkbox' with the given name, id, value and
// checked state
//
+ // function createElementInputFile($name, $id, $accept)
+ // returns an ExtendedElement that is an HTML <input> of type 'file' with the given name, id and accept
+ //
// function createElementInputSubmit($value)
// returns an ExtendedElement that is an HTML <input> of type 'submit' with the given value as label
//
function appendInputCheckbox($name, $id, $value, $checked) {
return $this->appendChild($this->createElementInputCheckbox($name, $id, $value, $checked));
}
+ function appendInputFile($name, $id, $accept) {
+ return $this->appendChild($this->createElementInputFile($name, $id, $accept));
+ }
function appendInputSubmit($value) {
return $this->appendChild($this->createElementInputSubmit($value));
}
$radio = $this->createElement('input');
$radio->setAttribute('type', 'radio');
$radio->setAttribute('name', $name);
- $radio->setAttribute('id', $id);
+ if (!is_null($id)) { $radio->setAttribute('id', $id); }
$radio->setAttribute('value', $value);
if ($checked) { $radio->setAttribute('checked', ''); }
return $radio;
$cbox = $this->createElement('input');
$cbox->setAttribute('type', 'checkbox');
$cbox->setAttribute('name', $name);
- $cbox->setAttribute('id', $id);
+ if (!is_null($id)) { $cbox->setAttribute('id', $id); }
$cbox->setAttribute('value', $value);
if ($checked) { $cbox->setAttribute('checked', ''); }
return $cbox;
}
+ function createElementInputFile($name, $id, $accept) {
+ $fileinput = $this->createElement('input');
+ $fileinput->setAttribute('type', 'file');
+ $fileinput->setAttribute('name', $name);
+ if (!is_null($id)) { $fileinput->setAttribute('id', $id); }
+ $fileinput->setAttribute('accept', $accept);
+ return $fileinput;
+ }
+
function createElementInputSubmit($value) {
$submitbtn = $this->createElement('input');
$submitbtn->setAttribute('type', 'submit');
// appends an ExtendedDocument::createElementInputCheckbox() as a child of this element (see there for params)
// returns the new child
//
+ // function appendInputFile($name, $id, $accept)
+ // appends an ExtendedDocument::createElementInputFile() as a child of this element (see there for params)
+ // returns the new child
+ //
// function appendInputSubmit($value)
// appends an ExtendedDocument::createElementInputSubmit() as a child of this element (see there for params)
// returns the new child
function appendInputCheckbox($name, $id, $value, $checked) {
return $this->appendChild($this->ownerDocument->createElementInputCheckbox($name, $id, $value, $checked));
}
+ function appendInputFile($name, $id, $accept) {
+ return $this->appendChild($this->ownerDocument->createElementInputFile($name, $id, $accept));
+ }
function appendInputSubmit($value) {
return $this->appendChild($this->ownerDocument->createElementInputSubmit($value));
}
// appends an ExtendedDocument::createElementInputCheckbox() as a child of this fragment (see there for params)
// returns the new child
//
+ // function appendInputFile($name, $id, $accept)
+ // appends an ExtendedDocument::createElementInputFile() as a child of this fragment (see there for params)
+ // returns the new child
+ //
// function appendInputSubmit($value)
// appends an ExtendedDocument::createElementInputSubmit() as a child of this fragment (see there for params)
// returns the new child
function appendInputCheckbox($name, $id, $value, $checked) {
return $this->appendChild($this->ownerDocument->createElementInputCheckbox($name, $id, $value, $checked));
}
+ function appendInputFile($name, $id, $accept) {
+ return $this->appendChild($this->ownerDocument->createElementInputFile($name, $id, $accept));
+ }
function appendInputSubmit($value) {
return $this->appendChild($this->ownerDocument->createElementInputSubmit($value));
}