cookn22
Active Member
I've made leaps and bounds with my fabrik know-how in the past couple weeks, but I'm still a newb, so bear with me...
Here's what I've been working on, which hasn't really worked...at all, but going through it may give someone an idea of what I'm trying to do:
I have two tables in the MySQL db, lets call them client_demographics and client_info. Each has an element "id". On the first form you enter in the fields for client_demographics and hit submit. (the client_demographics id is set to autoincrement). The jump page is set to the form for client_info. You fill in those fields and hit submit. Hopefully, the id for the client_info form is autofilled in with the id from the client_demographics form. The ideal outcome is a new entry in both the client_demographics and client_info tables that share the same id.
Now, I've been able to sort of get this to sort-of work by putting &rowid={id} in the jump url for the client_demographics form, and then have
for the default value of the id element of client_info and checking 'eval'. But this doesn't really work, since for some reason it won't put the rowid in to the value for client_info___id unless I refresh the page, so that's no good.
I know that joins are probably the answer to this somehow, but I haven't been able to figure out how to use them correctly, especially with this problem...
Any help or suggestions would be appreciated! I'm betting this is a common thing to do that I'm making extraordinarily difficult for myself...
Here's what I've been working on, which hasn't really worked...at all, but going through it may give someone an idea of what I'm trying to do:
I have two tables in the MySQL db, lets call them client_demographics and client_info. Each has an element "id". On the first form you enter in the fields for client_demographics and hit submit. (the client_demographics id is set to autoincrement). The jump page is set to the form for client_info. You fill in those fields and hit submit. Hopefully, the id for the client_info form is autofilled in with the id from the client_demographics form. The ideal outcome is a new entry in both the client_demographics and client_info tables that share the same id.
Now, I've been able to sort of get this to sort-of work by putting &rowid={id} in the jump url for the client_demographics form, and then have
Code:
$name = $GLOBALS[_REQUEST][rowid];
return "$name";
for the default value of the id element of client_info and checking 'eval'. But this doesn't really work, since for some reason it won't put the rowid in to the value for client_info___id unless I refresh the page, so that's no good.
I know that joins are probably the answer to this somehow, but I haven't been able to figure out how to use them correctly, especially with this problem...
Any help or suggestions would be appreciated! I'm betting this is a common thing to do that I'm making extraordinarily difficult for myself...