get current item dynamic page id and display in user input box

Hi,

You can set this up pretty easily using Corvid.

You can use a dataset onReady() and getCurrentItem() to determine what item page is currently being viewed.

Depending on the field you want to already be filled out in the input box automatically you would then just assign that value to the input box.

In the example below it pulls from the field “Favourite Genre” from the item in the collection that the dataset is connected to and prefills an input box with the value.

$w.onReady(function () {
    $w("#dynamicDataset").onReady(() => {

 let itemObj = $w("#dynamicDataset").getCurrentItem();

        $w('#input1').value = itemObj.favouriteGenre;

    });

})

I hope this helps!

Dara | Corvid Team

1 Like