magnusmanske / cradle

MIT License
8 stars 3 forks source link

Allow prefilling fields with query parameters #14

Open connorshea opened 1 year ago

connorshea commented 1 year ago

For example, I'd like to write a browser script that would add a button to video games on https://www.igdb.com that would pull data from the page (e.g. publication date, name of the game, platforms, etc.) and redirect the user to a pre-filled Cradle form for creating a new video game item. This'd make my workflow a lot simpler.

I assume the URL would look vaguely like this (I'm just using spaces rather than escaping it, for readability):

https://cradle.toolforge.org/#/subject/video_game?label[en]=Foobar Game&description[en]=2022 video game&P577=December 1 2022&P1733=12345&P5794=foobar-game-name

P577 is publication date, P1733 is Steam ID, P5794 is IGDB ID. If the values are invalid they'd just be thrown out, or if the property used isn't represented in the specific cradle form, it'd also be thrown out.

susannaanas commented 1 year ago

I would be interested in the same functionality. In my case, there is a Wikipedia table where data is collected. When data about an item is complete enough, someone could create the item by prefilling the Cradle form with values from the table.