Prefill fields from URL

Hi all.

Is it possible to prefill a log using the URL?
That would be cool.

For example :
/log/add/activity=“Prefilled with asset-this and group-that”

2 Likes

It actually is possible to prefill the asset field with asset IDs like this:

/log/add/activity?asset[]=1&asset[]=2

That’s the only “prepopulating” farmOS supports currently… but certainly could consider adding more.

That is handled here: https://github.com/farmOS/farmOS/blob/35d30aaa0520bace516e6eea76f03eec62a83c05/modules/core/log/farm_log.module#L14

1 Like

Wow… That’s awesome.
:+1:

1 Like