Form field overrides the value of the component.

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets)

I’m creating a campaign creation form that has multiple custom components, one of the components is a custom upload field with an object as the values depending on the upload. one example:

[
{
uid: “12234”,
name: “hello.glb”,
size: “big”,
type: “glb”,
lastModified: 233,
contents: “things”,
status: “up”,
URL: “https://tddrchq…”,
FilePath: “https://tddrchqtaigzqz…”,
LocalUrlFile: “https://tddrchqtaigzqzbnznn…”
}
]

The issue is that when i use it inside the form field and i upload a file, instead of that field key saving the array it simply displays: “C:\fakepath\SILLON.glb”

How can i specify to the form field where should it get its value from and to. there is a prop inside the form field called “value prop name” but there is no information on how to use it or what is supposed to do, this makes it impossible to submit the information of the upload when submitting the form. how can i tell it that the expected format is:

{
“File_test”: {
“uid”: “string”,
“name”: “string”,
“size”: “number”,
“type”: “string”,
“lastModified”: “number”,
“status”: “string”
}
}

Now this creates another issue. When i use the variable of the corresponding form field as the the value of my component as seen here:

and prefill the form using the “set multiple fields” interaction, the component does display the array information as it should but then if you replace or upload a new file, it now overrides it to “C:\fakepath\SILLON.glb” even though the “value2” as seen on the picture above does have the object of the new file inside:


I want to reiterate the upload field is not a default upload field, this one is a component with 3 upload fields and multiple buttons, and even if i upload a video and a picture the form just saves the last upload as the unusable field.

I`ve tried everything with no luck, from using the variable of the component in the “initial values” to nesting the component into another component to try and see if it stops being recognized as simple upload field, to changing the “validate when” and “customize props”.

Also i can’t use and interaction like on value change because then the function loops as it should work both ways, in case someone loads a previous project (set field) or uploads a file directly, if i use an interaction that would update the field on value Change it will not copy its value to the component which will trigger the function and it just crashes.

What are the reproduction steps?

create a new component with an upload field inside, then use this in the form field, when you upload something and check the value of that field key you will only get C:\fakepath\NAME instead of the array of the upload field. if it cant be reproduced here is the link to my project: https://spatialdynamics.plasmic.run/campaigns/new

to prevent future topics as im using other custom components in the form please help me with the following questions as there is very little information in the documentation of the form.

1.- how do i tell a form field where the value of its component is.
2.- how does the component inside the form field receive the “initial value” even though i change it nothing happens, only works on default components like text input.
3.-how do you use the “customize props” prop, the “dependancies” and “field control”, i can read the descriptions but how do you actually use them. there is no information on the docs about these.

Relevant links:
https://spatialdynamics.plasmic.run/campaigns/new

ChatGpt told me how to solve it.

thanks.