
const handleChange = (event) => {
event.preventDefault();
props.setSelectedValue(event.target.value);
const client = new Client()
client.setEndpoint('https://api.printfc.in/v1') // Your API Endpoint
.setProject('64242c801cdd58d2213');
const databases = new Databases(client);
const promise = databases.createDocument(
'6426fd4b827fedc4a235',
'6426fd9b65c0b7f2c561',
ID.unique(),
{
opt1,
opt2,
opt3,
opt4,
}
);
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});
};

what is the type of the selected-value?

string

there is the error

{ "selected-value": "your fields here"
}

where should i add it

this is not a valid json:
{
opt1,
opt2,
opt3,
opt4,
}

??

`const handleChange = (event) => { event.preventDefault(); props.setSelectedValue(event.target.value); const client = new Client() client.setEndpoint('https://api.printfc.in/v1%27) // Your API Endpoint .setProject('64242c801cdd58d2213'); const databases = new Databases(client); const promise = databases.createDocument( '6426fd4b827fedc4a235', '6426fd9b65c0b7f2c561', ID.unique(), { "selected-value": "your fields here" } );
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});
};`

what should i replace in "your fields here"

`const handleChange = (event) => { event.preventDefault(); props.setSelectedValue(event.target.value); const client = new Client() client.setEndpoint('https://api.printfc.in/v1%27) // Your API Endpoint .setProject('64242c801cdd58d2213'); const databases = new Databases(client); const promise = databases.createDocument( '6426fd4b827fedc4a235', '6426fd9b65c0b7f2c561', ID.unique(), { "selected-value": "{userId:12345,numberPages:10,numberCopies:2,Colorful:true,BothSides:false,fileId:abcdefg}" } );
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});
};`

what value should i replace in userId and fileId

and should i set numpagesand etc to default

the fields you want to store

where does that fields present

no website

???

What is your frontend programmed for?

to upload files and to input the values

Hi @Bharath if no extra help is needed here can we close this?

I think you have mentioned wrong guy 馃檪

Sorry!

My apologies

[solved] 400() error....

[SOLVED] 400() error....
Recommended threads
- Looking for Partner
I'm looking for partner for long-term collaborating. Of course, I'll pay for you. If you are interested, Please DM me.
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: {聽聽"name":聽"upload-whitelist",聽聽"type"...
- Looking for Partner
I'm looking for partner for long-term collaborating. Of course, I'll pay for you. If you are interested, Please DM me.
