I want to design a form which has two input text field. What users type in field 1 will be passed to field 2. How can I do this in Deno Fresh?
Here is my best try:
function passToField2(event){
// What to put here
}
export default function Home(props) {
return (
<div>
<input
name = "Field 1"
type = "text"
onChange={(event) => passToField2(event)}
></input>
<input
name = "Field 2"
type = "text"
value = {props.valueFromField1}
></input>
</div>
);
}
Here is the current code, suggested from https://discord.com/channels/684898665143206084/991511118524715139/1194335634228256828
routes/index.tsx:islands/form.tsx: