Form Help

I’m creating a Form that has 3 Dynamic parts (Testing shows I need HELP)

  1. User clicks link at a website & Form appears on its own page

Only the First Name & Lastname fields appear
After filling out both required text fields the form connects to User table, Ajax searches to find that user by the combination of firstname & lastname fields & selects the projectid value in another User table field & returns it to a Hidden projectid field in the online form
Based on the projectid = 1, 2, or 3 associated with the User’s name
A conditional Hide or Show occurs for the 2 div blocks containing 3 questions for one type of user or 3 different questions for another type of user

  1. the form contains 3 text inputs that will show to the User if their projectid value is 1
    If that projectid is 2 then the user only sees a different set of 3 text inputs
    If the projectid is 3 then the user sees all 6 text inputs

  2. Once the form is displayed as intended I need a 2nd database connection to a different table – report – to begin collecting the form data on submission

  3. To Insert as a new record when the User completes the form the SQL insert will contain every field, 12, including the hidden ones with a default 000 digits value, mapped to the corresponding report table

  4. I’m having to bounce around from one tutorial topic to the other to pull this together and other than creating 2 connections to 2 different tables the different ways to make a form is confusing me – so far I’m getting errors

such as
dmxConnectLib/modules/dbupdater.php(38): lib\db\Connection->execute(‘INSERT INTO `20…’, Array, false, ‘2020’)\n#2
or

0/dmxConnect/api/insert.php(8): lib\App->define(Object(stdClass))\n#7 {main}"}

I need to present the Firstname & Lastname displayed only
then check one table to confirm user exists and retrieve their assigned projectid
to use as the conditional to present different groups of 3 questions with text inputs

Then on submit write the record to the 2nd report table & kiss them goodbye

Does anyone have suggestions on what steps to take after creating the 2 connections which I have?

And which tool I should use to most quickly create the form itself?
Thank you for tried & true pathways!

Community Page
Last updated: