Dynamic Forms Populate within Form

Good morning, I have a form(form1) within another form(form2), however I need to get the value entered from a textbox (form2), in a textbox(form1), in form1, whenever the form2 is submitted, skip a line in the textbox(form1) and add the value of the textbox(form2), without removing what was already in the textbox(form1).

there are 2 public forms.

is that possible?
how could i proceed with this?

thanks a lot!

Dear @Matheus_Felipe,
If they are published on the same page, you can try making the form content available page wide with JavaScript. For this, add the following line to the JS editor on the Form1:

window.form1 = fd;

And the following line to the JS editor on the Form2:

window.form2 = fd;

Then, you should be able to access form1 and form2 from the JS editor of either form:

fd.field('MyText').value = form1.field('Text').value;
1 Like

Dear @Nikita_Kurguzov
so, I have 2 forms (form1) and (form2) in plumsail, I call (form2) inside (form1) via the html element and pass the necessary parameters to this form with the function

window.fd2 = new Plumsail.PublicForm('#plumsail-form2', formid);

after that I can use form2 several times (to add several products to a sharepoint list) and when I want to finish adding items, and start the flow in automate, I finish form1, but I have a field called txt_list_added_products that I would like that whenever a product is added in form2 (the product is added when the form2 is sent) the name of the added product is inserted in form1 in a text field (txt_list_added_products), or in a table, whatever, but only when the form2 is sent.

is that possible?
How can I do this?
i am available for more information if needed.
thanks for your attention and dedication.

Dear @Matheus_Felipe,
Can you show me exactly how the two forms are connected? Are they published on the same page or how does it work?

my main form.
Form_Enviar_Solicitacao.json (40.2 KB)

my second form Form_Add.json (98.2 KB)

Dear @Matheus_Felipe,
It's really not the best idea to add a form inside of another form as it can lead to various issues, best use separate fields on the existing form to replicate another form.

However, if you must, you can leave just this line in the HTML control:

Then, you can load another form and access its values from the JS editor of the form: