Skip to content

Commit 21d062f

Browse files
committed
docs: move supported control to layout page
1 parent 068d229 commit 21d062f

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

docs/index.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,6 @@
9595
<?php include('overview/objects.php'); ?>
9696
</div>
9797

98-
<h2 id="controls">Supported controls</h2>
99-
<p>The basic form of all fields is <code>$f->field($key, $label, $options);</code></p>
100-
<?php display('overview/controls.php'); ?>
101-
<div class="example">
102-
<?php include('overview/controls.php'); ?>
103-
</div>
104-
10598
<h2 id="nested" >Nested data/"forms"</h2>
10699
<p>Forms can be nested by using <code>fields_for</code> to allow either sending to unrelated objects or multiple instances of the same class.</p>
107100
<?php display('overview/nested.php'); ?>

docs/layout.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
'table' => 'layout/layout_hints.php',
1616
'*' => false,
1717
],
18+
'Supported controls' => 'layout/smoke.php',
1819
];
1920

2021
require '../vendor/autoload.php';

docs/overview/controls.php renamed to docs/layout/smoke.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?php /*~*/
22
use NitroXy\PHPForms\Form;
33
use NitroXy\PHPForms\FormSelect;
4+
global $layout;
45
?>
56
<?php
67

7-
Form::create('example5', function($f){
8+
Form::create('smoketest', function($f){
89
$f->hidden_field('name', 'Hidden (this wont show at all)', ['value' => '8']);
910
$f->text_field('text_field', 'Text', ['hint' => 'Use the "type" option to use custom type such as number.']);
1011
$f->password_field('password_field', 'Password', ['hint' => 'Passwords are not persistent if autocomplete is off', 'autocomplete' => 'off']);
@@ -33,4 +34,4 @@
3334
$f->text_field('text2', 'Input 2');
3435
$f->text_field('text3', 'Input 3');
3536
});
36-
}, ['layout' => 'bootstrap']);
37+
}, ['layout' => $layout]);

0 commit comments

Comments
 (0)