close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

create other option in forum and second clients details

Thread began 12/08/2009 6:24 pm by mr hankey | Last modified 12/23/2009 3:41 pm by Jason Byrnes | 1661 views | 16 replies |

mr hankey

create other option in forum and second clients details

hi,

i have currently in my insert to clients table a forum with all the details, however if i need it to be a joint client sale i.e. mr and mrs smith how would i go about this?

also have a form that has a tick box which if ticked it produces another question?

if you could help me out that would be greatly appreciated.

many thanks

Sign in to reply to this post

mr hankey

also would i need to add duplicate into the mysql table of clients?

i.e. what i have in there but twice?

thanks

Sign in to reply to this post

mr hankey

could anyone from WA support help me with this please?

many thanks

Sign in to reply to this post

Jason ByrnesWebAssist

Basically, you are asking about creating a many to many relationship.

A client can relate to multiple users, and a usert ca relate to multiple clients.

To do this requires a linking table:


clients:
clientID - Primary Key
clientName - text
etc.


users:
userID - Primary Key
UserName - text
etc

ClientUsers:
ClientUsersID - Primary key
usersUserID - Foreign key relation to users.userID
clientsClientID - Foreign key relation to clients.clientID

the ClientUsers table above is used to create the many to many relationship of users to clients.


to have a check box that shows another form element, apply required client side validation to the checkbox on the onBlur event, then add the Show hide form element response from the client side validation, also on the on blur event.

Sign in to reply to this post

mr hankey

thanks jason for all your help. i think i get you however not sure if on the same track here.

what i would require is:

user can be related to multiple clients.

but my main issue is, creating a table the can hold a joint client app i.e. husband and wife application etc.

would i need the same columns in mysql in the same table:

firstname
secondapplicantfirstname
lastname
secondapplicantlastname

etc

hope this helps explain better :)

also is the on blur effect in dreamweaver or a webassist ext?

many thanks

Sign in to reply to this post

Jason ByrnesWebAssist

you could do it this way, but that causes lots of data duplication which is what databases are used to prevent.

plus, what happens if you run into a case where you want to relate to three people? you need to add more columns.

This is why you use the linking table.

With the linking table, you link as many clients as you like to as many users as you like

the onBlur event is an html event. it refers to removing focus from one form element and focusing another

Go to the Bindings panel and select your text box. Then click the plus button in the bindings panel and select WA Validation Toolkit -> Client Validations -> required / Not Blank. When you apply this, make sure to set the event in the bindings panel to the onBlur event.

next apply the show hide form element validation response, also to the onBlur event of the checkbox.

Sign in to reply to this post

mr hankey

thanks jason, so in the way of creating the form, how would i achieve this having it a forum which has same details on one side of screen same on ther with dataassist?

many thanks

Sign in to reply to this post

Jason ByrnesWebAssist

I'm sorry, I understand what you are asking. can you provide some more details on what you are trying to accomplish.

Sign in to reply to this post

mr hankey

thanks jason,

so basically the insert record form needs to be for a joint insertion. i.e. a couple making the application.

so in the insert record page that dataassist creates i need it to be first name etc but one side of page for first applicant and other half for second applicant. also i would require a next button at bottom as the page could become very long with the form fields that i need. could you advise on this?

hope that is better.

thanks again mate for your help

Sign in to reply to this post

Jason ByrnesWebAssist

First off, what you re trying to accomplish will not be done entirely by DataAssist, you will need to do some manual development on this.

I would not create the form with First applicant details on one side and Second applicant details on the other side. I would break it down.

create an application table, this holds data unique to the application.
Create another table for the applicant information, this table will hold the personal inforamation for each applicant. It will have a foreign key relation to the application table to relate the applicant to the application.

The first form will be the application form, they will fill in all of the information about the application except for personal details.

When this is submitted the DataAssist server behavior will insert the application data to the application table. In the DataAssist Insert record server behavior, there is a session variable section. This is used to store the ID of the inserted record into a session variable, select the application ID column and the name to store the session as, remember this name.

The insert record server behavior will redirect to the applicant insert page. On this page is a form to fill in the applicants personal details. When this is submitted, the insert record behavior will store the personal details in the applicants table. For the Foreign key column that relates to the application table, bind to the session variable that is created by the insert Record behavior on the application page. Either leave the redirect blank or on the redirect page, offer a button to go back to the applicant insert page to add another applicant to the application.



So the work flow will be:
Create the application -> Add Applicants personal information -> Add additional applicant personal details or finish.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...