# Copy readonly text in form via button (or ... menu)

**URL:** <https://community.qfield.org/t/copy-readonly-text-in-form-via-button-or-menu/1965>\
**Category:** Ask the Community\
**Created:** [1 October 2026 08:03 UTC](https://community.qfield.org/t/copy-readonly-text-in-form-via-button-or-menu/1965 "2026-10-01T08:03:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marc\_boelaers](https://dub1.discourse-cdn.com/flex018/user_avatar/community.qfield.org/marc_boelaers/32/1575_2.png) [@marc\_boelaers](https://community.qfield.org/u/marc_boelaers)\
**Post date:** [1 October 2026 08:03 UTC](https://community.qfield.org/t/copy-readonly-text-in-form-via-button-or-menu/1965/1 "2026-10-01T08:03:16Z")

</div>

Hello Community,

I have a form field (logging records) which needs to have the same text as the previous record.

I would like to copy the text (‘Terrein maaien’ in this case) via a button so that it can be pasted in a new record.

Via a ‘copy’ button would be ideal or via a 3-dotted menu.

Thanks for your input

 ![image](https://europe1.discourse-cdn.com/flex018/uploads/qfield/original/2X/8/8563ddf2dc30123b226e3aea81a3a4c8306b0e15.png)

---

<div class="post-metadata">

**Author:** ![cuprico](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@cuprico](https://community.qfield.org/u/cuprico)\
**Post date:** [1 October 2026 12:14 UTC](https://community.qfield.org/t/copy-readonly-text-in-form-via-button-or-menu/1965/2 "2026-10-01T12:14:30Z")

</div>

hello @marc_boelaers !

I think the only way to add such a button would be to create a plugin. I have thought of other alternatives that can be achievable just by configuring your project:

- If you specifically need to get a value from the previous record (e.g. the last value from your layer), I think you can auto-populate your new attribute using a Default Value Expression. You’ll probably need to use a function such as `attribute()` and pass it the previous feature with `get_feature()`, similar to what is explained on this [stackExchange question](https://gis.stackexchange.com/questions/442304/display-attribute-value-from-a-given-layer-in-qgis). I think you should be able to get the `fid` of your current feature and remove it by 1 and get the previous feature on your layer.
- Other option would be to have a dropdown with all the values already used for that attribute. In that case, QField can give you an autocomplete function, plus a search function; with both of those, you can significantly reduce the chances of misstyping the values. You can check [this video](https://www.youtube.com/watch?v=H9VQ1fcLvQM) to get an idea of how this works.

---

<div class="post-metadata">

**Author:** ![VxTedxV](https://dub1.discourse-cdn.com/flex018/user_avatar/community.qfield.org/vxtedxv/32/1244_2.png) [@VxTedxV](https://community.qfield.org/u/VxTedxV)\
**Post date:** [1 October 2026 23:49 UTC](https://community.qfield.org/t/copy-readonly-text-in-form-via-button-or-menu/1965/3 "2026-10-01T23:49:34Z")

</div>

Did you know that QField can autocomplete the value from the last record ? 😉  
More info there : ["Remember last value" pins don't show up in feature addition form · Issue #7169 · opengisch/QField · GitHub](https://github.com/opengisch/QField/issues/7169)
