Buy Now
Sign in

Pass a parameter thru the Bot

scitrek , January 12 2008, 01:14
S
scitrek 3
January 12 2008, 01:14 #4895
Hi, I have a small question. I've just created a form to collect a few visitor informations and store them into a CSV file. I would like to include it into my contents and I've installed the Bot to do that.

Question is: in my form, I've got an hidden field that indicates in wich file the informations will be stored. How can i pass such a parameter when I include the form with the bot?

Thanks!
GreyHead 64
January 12 2008, 17:17 #4899
Hi scitrek,

I'm not sure that I understand what the problem is. How are you putting the data into the CSV file? If you are using ChronoForms then I think it should work in the same way in the page or the bot.

Bob

PS Why not save the data into the database using ChronoForms AutoGenerated code? You can export that as a CSV from ChronoForms.
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
scitrek 3
January 12 2008, 18:50 #4901
Hi, thanks for answering. The reason I wrote my own code to put the data into a CSV file is that I need this file to be directly downloadable by a third person, and I don't want to give this person access to the Joomla administration.

Moreover, i need the form to save the data into a different CSV file, basing on an hidden field of my form.

So, I need to be able to modify automatically this hidden field, since the different section the visitor is requiring information, the different CSV file is gonna be updated.

Right now, I just put a link into each content, pointing to the chronocontact component and appending a GET variable that represents the section. Then, in the form code, I wrote a little PHP script to get this code and put it into the hidden field. I hope I explained it right.

Now I was wondering if it would be possible to include the form into my contents, using the BOT, and yet pass the parameter to modify the hidden field.

Is that possible? Thanks!
GreyHead 64
January 12 2008, 19:32 #4902
Hi scitrek,

I don't really understand what's availalbe to the mambot but it looks as though $params->get('sec', 1) should pick up the current page section id that you could pass back to your PHP snippet.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
admin 28
January 14 2008, 19:55 #4915
Hi scitrek,

Does <?php echo $id; ?> shows any thing when you add it to the form HTML and then show the form through the bot ?

Cheers

Max
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
S
scitrek 3
January 15 2008, 08:06 #4945
Actuall what I needed was to be able to pass some parameters to the BOT thru it's call, like {chronoform}formname|param1=value1|param2=value2{/chronoform}, but I don't think this is possible in ChronoForms.

Right now I solved by getting rid of the BOT and manually adding a link to the form page in each content, passing the parameters thru the GET method.

Thanks anyway.
GreyHead 64
January 15 2008, 18:12 #4954
Hi scitrek,

Ah, sorry I misunderstood. That's not possible at present.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much