# Empty inptuts without Form-\>create()

**URL:** <https://discourse.cakephp.org/t/empty-inptuts-without-form-create/3558>\
**Category:** Need Help\
**Created:** [November 22, 2017, 11:32pm UTC](https://discourse.cakephp.org/t/empty-inptuts-without-form-create/3558 "2017-11-22T23:32:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarekgol](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jarekgol](https://discourse.cakephp.org/u/jarekgol)\
**Post date:** [November 22, 2017, 11:32pm UTC](https://discourse.cakephp.org/t/empty-inptuts-without-form-create/3558/1 "2017-11-22T23:32:40Z")

</div>

Hi!  
I’ve got form with inputs, some make manually in html/php some as Form-\>input  
On top of the form is “if” and I echo $this-\>Form-\>create($order) when I allow edition and don’t echo this when I want to prevent edition.

But I saw today that when there is no Form-\>create my Form-\>inputs are displayed blank without default value passed in $order (checked in debug)

Can I pass some additional args to Form-\>input or change some config and see those values?

---

<div class="post-metadata">

**Author:** ![raul338](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/raul338/32/69_2.png) [@raul338](https://discourse.cakephp.org/u/raul338)\
**Post date:** [November 26, 2017, 3:28pm UTC](https://discourse.cakephp.org/t/empty-inptuts-without-form-create/3558/2 "2017-11-26T15:28:46Z")

</div>

You can pass ‘value’ option

```php
$this->Form->input('name', [
    'value' => 'Pre filled name',
]);

```

---

<div class="post-metadata">

**Author:** ![rrd](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/rrd/32/113_2.png) [@rrd](https://discourse.cakephp.org/u/rrd)\
**Post date:** [November 27, 2017, 6:22am UTC](https://discourse.cakephp.org/t/empty-inptuts-without-form-create/3558/3 "2017-11-27T06:22:21Z")

</div>

If you want to prevent edition do not use a form just display the values as strings.  
And do not forget to prevent edition in the controller also.

---

<div class="post-metadata">

**Author:** ![jarekgol](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jarekgol](https://discourse.cakephp.org/u/jarekgol)\
**Post date:** [November 27, 2017, 8:33pm UTC](https://discourse.cakephp.org/t/empty-inptuts-without-form-create/3558/4 "2017-11-27T20:33:55Z")

</div>

Thank you guys, I will check value options, it is just more convenience to me to add one if on top of the template and not many ifs on every single displayed data. Also it keeps same look.  
Of course I’ve got also check on controller side.
