How to grab session userid for form

tigger4444 28 Sep, 2012
I have my table created and it working and saving data when I submit my form. What I am trying to do is have it save the specific userid of the user submitting the form. I am guessing there is a session being done while the user is on the site and logged in. When a user registers they are granted a numerical id and it goes up by one with each registration. Is there a way I can grab the ID of the user on form load?

Update: I tried to use the form with my test account and it saved that user id with the other data in my table as cf_user_id. So this works just fine. Now I need to figure out how to load data from the table using a search parameter that is the current user id and the search query. SO this is what I need help with now. Sorry for me keep updating but I am learning as I go.
tigger4444 28 Sep, 2012
OK new update. I have been using the form wizard to make a form for searching the table I made. I see I have to write custom code to work this correctly. So on DB record loader I go into the advanced part. The box to put a where statement is where my code should go? I am trying to formulate a search searching by user_id (or cf_user_id in the table) and whatever the user types in to search which is 'cf_reqname' and on all records that these are both found I need to return 'cf_reqdescr' from each record.

I am currenty reading and searching my behind off but would real really really appreciate anyone who can help on this.

EDIT: OK. I am lost on this part. I have searched the crap out of the forum here and seen stuff close to what I am doing but none of it helped most likely because I am a noob. I will just try to wait patiently and see if this gets answered. I know you guys are busy. Thanks in advance for anything you come up with.
tigger4444 28 Sep, 2012
OK I have managed to get it to get the userid from joomla and use it to grab all the records make with that userid. This is far as I managed to get. I can make it show the results of db multi load I got to here.
How to grab session userid for form image 1

So I know it is working as far as I am getting the correct user id and using it to pull just that data from the table.I will fix the part that displays that data since I just enabled it to see if I was getting anything from the dbmultiload. It is the 2 fields displayed I am interested in. What I need now is to take that data and have my form search it for a certain name in from the one field and display all the entries with that certain name and just display the second field on all that match. You can see above it is displaying the data then my search form below it. SO it should be loading the data as I have it doing now then let me enter in that box to search through that data to display my desired results.

Here are pics of my settings and such.
How to grab session userid for form image 2
How to grab session userid for form image 3
How to grab session userid for form image 4
How to grab session userid for form image 5
How to grab session userid for form image 6
How to grab session userid for form image 7
How to grab session userid for form image 8

Here is the debug after clicking submit with a search query in
Data Array:
Array
(
[option] => com_chronoforms
[tmpl] => component
[chronoform] => hitlistsearch
[Itemid] =>
[cf_reqname] => trest name
[input_submit_2] => Submit
[5f289ff16793b2e82ea6ab40ee0a0b23] => 1
)
Validation Errors:
Array
(
)
Debug Data
db_multi_record_loader
SELECT `JosChronoformsDataHitsubmit`.* FROM `jos_chronoforms_data_hitsubmit` AS `JosChronoformsDataHitsubmit` WHERE `cf_user_id` = '0'
Requster_Name Hit_Description
trest name test description
fgfg fgfgfgfgfg
fghjdfg vbhmgm




That should be everything I got set so far. I have already sent you $5 and will have no problem sending more if you can help me get this working. Thank you.
tigger4444 29 Sep, 2012
Did I not mention I would pay for help? I already paid $5 for a few sentences and clearly mentioned I would pay more for help. Did I do something wrong? everyones post got answered to but mine today.. I have searched this forum to death to get where I am now. Kinda bummed.. I hoped the place selling the product I am using would hire their help to me. Whats the point of buying chronoform if you can't get help for it. Glad I didn't purchase it yet.. something told me to wait first to make sure I could use it exactly how I needed. Yes I know I am a Dummy when it comes to this stuff. Sorry for this post but I feel ignored. Nuff said.
GreyHead 29 Sep, 2012
Hi tigger4444,

I hope that made you feel better. I'm a bit sorry and surprised that you expect fast support for free - or close to free - on a product that you haven't paid for. I'm sure that in your forum searches you read the "Asking Questions in the Forums" announcement post.

As it happens I was out most of the day yesterday. The time I spent here was on clearing some posts that allowed quick answers and some that had been around longer than yours. I'm also going to be out most of the day today - it's Saturday here.

I will answer your post when I have time; and thank you very much for the $5 payment you have made, it is appreciated.

Bob
tigger4444 29 Sep, 2012
Wait a minute.. How do you get I am trying to get help for free. I sent you $5 to show I am serious about it. Then several times stated that I will PAY GLADLY for the help I need to get this working. As for buying the product why in the world would I buy it if it cannot do what I need it to do. The whole point is getting the thing working to do what I need so I can then BUY it and happily have it not have that garbage spam linked on it. Why would someone go live with that on the module? But whatever.. you are obviously not reading what I post I guess cause NOWWHERE did I post I wanted FREE help. You just lost a customer, a sale for your software, and a possible $50-100 for a bit of help. I will try another route to get what I need working. Good day.
This topic is locked and no more replies can be posted.