passing the form ID to another form

Confluence User - 22 Oct, 2024

I have 1 form that will have some of the information 
the other form should then use the same id as the form 1 and add extra information when i create the information the id generated from that form should be the same as the form 1 

I want the 2 forms to be separated and not use a form grid or anything like that

i have an idea about it but don't know how to execute it. my idea is to pass the URL id but i have no idea how to do that.

if possible can help me take screenshot with the explaining

forms;datalists;id

1


22 Oct, 2024
confluenceUser
1
confluenceUser

Hi Tarek, 


Please find the steps:

In Joget, to extend a form's data with additional fields while maintaining the same record ID, create two forms pointing to the same database table:

  1. Create Form A with initial fields
  2. Create Form B with additional fields
  3. Set both forms to use same table name as this approach allows Single record ID across both forms , Different form layouts/fields and Separated data collection processes


In the below screenshot you can see I have created 2 forms but the table name is same for both "app_fd_test_form"




Next, Create CRUD for Form 1 and Add Form 2 in the UI builder. 






Now launch this UI and get the URL of the Form 2.

Example: somedomain.com/jw/web/userview/form_redirect/v/_/form_2 

You can remove the domain part and use it from /jw/web/userview/form_redirect/v/_/form_2


Next, Go to Form 1's list builder → Add a hyperlink column → Paste Form 2's URL → Add the record ID parameter to the URL (e.g., ?id={id}) as shown below. 




Save and test. In the below screenshot 'Name' is from Form 1 and 'Address' is From Form 2.  Each time edit address is clicked it will take you to Form 2 → with Form 1 record id allowing you to add additional information for the same record. The New button will show Form 1 where as edit address will take you to Form 2. Additionally after getting Form 2 URL you can hide it in the UI for better user experience. 



You can download and refer the app directly. Hope this helps.

APP_form_redirect-1-20241022103359.jwa


RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print