# Method for writing fields?

**URL:** <https://forum.getkirby.com/t/method-for-writing-fields/2437>\
**Category:** Questions\
**Tags:** v2\
**Created:** [November 8, 2015, 3:44pm UTC](https://forum.getkirby.com/t/method-for-writing-fields/2437 "2015-11-08T15:44:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmsecchis](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jmsecchis](https://forum.getkirby.com/u/jmsecchis)\
**Post date:** [November 8, 2015, 3:44pm UTC](https://forum.getkirby.com/t/method-for-writing-fields/2437/1 "2015-11-08T15:44:46Z")

</div>

As far as I know, all default Kirby methods are the ‘Return’ type.

What about methods for writing objects?

I want to make an interface with editing capabilities, so I can make simple changes without going over to the panel.

I would like for example, to rewrite a page field based on a frontend input.

Sure I can use xml, json, native PHP yaml, etc. But I want to know if is there a way to do this inside Kirby.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [November 8, 2015, 3:51pm UTC](https://forum.getkirby.com/t/method-for-writing-fields/2437/2 "2015-11-08T15:51:36Z")

</div>

Do you already know `$page->update()`? [http://getkirby.com/docs/cheatsheet/page/update](http://getkirby.com/docs/cheatsheet/page/update)

---

<div class="post-metadata">

**Author:** ![jmsecchis](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jmsecchis](https://forum.getkirby.com/u/jmsecchis)\
**Post date:** [November 8, 2015, 4:02pm UTC](https://forum.getkirby.com/t/method-for-writing-fields/2437/3 "2015-11-08T16:02:57Z")

</div>

I sure did not. Thank you

---

<div class="post-metadata">

**Author:** ![Svnt](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/svnt/32/620_2.png) [@Svnt](https://forum.getkirby.com/u/Svnt)\
**Post date:** [November 8, 2015, 4:20pm UTC](https://forum.getkirby.com/t/method-for-writing-fields/2437/4 "2015-11-08T16:20:09Z")

</div>

used structure and page update in this demo code: [https://gist.github.com/svnt/9ef24a0be14d5208fdad](https://gist.github.com/svnt/9ef24a0be14d5208fdad)

maybe it helps.

Svnt

---

<div class="post-metadata">

**Author:** ![jmsecchis](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jmsecchis](https://forum.getkirby.com/u/jmsecchis)\
**Post date:** [November 8, 2015, 4:23pm UTC](https://forum.getkirby.com/t/method-for-writing-fields/2437/5 "2015-11-08T16:23:29Z")

</div>

That is exactly what I was about to ask: to change structure fields.

I will try that

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:04pm UTC](https://forum.getkirby.com/t/method-for-writing-fields/2437/6 "2025-02-06T17:04:17Z")

</div>

Archived on February 6, 2025, 5:04pm UTC


