Prefilling text input on a dynamic page?

To grow a database of events, I want to allow anyone with knowledge or interest in an event to be able to add, amend or update relevant listings. It is therefore preferable users have the ability to suggest amendments to an existing listing (on a dynamic page) without having to obtain a permission.

Because of this open access, I need to be able to review the suggestions before they are incorporated.

I therefore have a “Suggest Update” button on the event (dynamic page), which leads to a further dynamic page similar to that page, with text replaced with “text inputs”. I want these inputs to be pre-filled as per the event listing dynamic page, but when submitted, go to another database which I can then review and (if approved) manually add to the live database.

The closest I can get to achieving this is through the following code:

$w.onReady(function () {
let itemObj = $w(“#dynamicDataset”).getCurrentItem().displayLocation;{
$w(‘#input1’).placeholder = itemObj;



This looks the way I want it, however obviously ‘Placeholder’ text isn’t achieving the objective of having the data in a form that can be amended and submitted.

I’ve tried the same code, replacing “placeholder” with “value”, but in that case nothing shows up.

Is there a way to have the “itemObj” show as the ‘Initial Input’?

Your assistance would be greatly appreciated.

Not sure this is your problem, but you might want to review the TextInput.value docs.

Somewhat down on the page you will see this:
To submit the new value using a dataset, set the field’s value using the setFieldValue() function before performing the submit.

You might give that a try. Let me know if it works.