ChronoEngine Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Insert cf_id into the response email (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Insert cf_id into the response email
#1445
GreyHead (Admin)
Admin
Posts: 2801
graph
User Offline Click here to see the profile of this user
Re:Insert cf_id into the response email 11 Months, 1 Week ago Karma: 59  
Hi ws & Max,

Sorry, I didn't do enough checking. This does work with a template but you need an extra line.
Code:

<? $cf_id = 0; $query = "SHOW TABLE STATUS LIKE 'jos_chronoforms_1'"; $result = mysql_query($query) or die ( "Query failed: " . mysql_error() . " " . $query ); $row = mysql_fetch_assoc($result); $cf_id = $row['Auto_increment']; $html_message = str_replace( "#####", $cf_id, $html_message); ?>
If you put ##### in your template where you want the cf_id this will work. (I couldn't get it to work with '{cf_id}' as a marker though.) Bob
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/05/29 08:19 By GreyHead. Reason: fixed html entities
 
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
  The administrator has disabled public write access.
#1447
websavages1 (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Insert cf_id into the response email 11 Months, 1 Week ago Karma: 0  
How long can it wait, about five minutes longer than it will take you to announce a new release.

If you could include it that would be fantastic.

Cheers ws

Edit: Damn that's the second time I have replied to a post before I read all the replies. I will try the latest suggestion as per Bob's post (Dated 2007/07/27 09:47) My original statement above regarding Max's reply will also be valid.

Thanks to both of you for such a great effort.

Cheers ws<br><br>Post edited by: websavages1, at: 2007/07/27 12:12
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1603
websavages1 (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Insert cf_id into the response email 11 Months ago Karma: 0  
I have just implemented what Bob suggested and it works a charm. Thank you both.

Cheers ws
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6699
jeffw (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:Insert cf_id into the response email 3 Months, 2 Weeks ago Karma: 0  
Hi, I'm hijacking this old thread because I want to do the same, but the solution
Code:

SHOW TABLE STATUS LIKE 'jos_chronoforms_1'
could go wrong if two forms are submitted at the same time. A better solutions I think would be use
Code:

$return_id = $database-&gt;insertid();
in the auto generated form. It works so far as I get the correct value in the Auto Generated Code, but how can I pass it to the On Submit Code? I tried it but the variable keeps coming up empty. Btw, this is my first post and thanks for ChronoEngine. It works great!
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6701
GreyHead (Admin)
Admin
Posts: 2801
graph
User Offline Click here to see the profile of this user
Re:Insert cf_id into the response email 3 Months, 2 Weeks ago Karma: 59  
Hi jeffw,

I think that variables declared in the various ChronoForms boxes only have local scope. So the easy, if slightly cumbrous, way round this is to put a hidden input into your form and then set the corresponding entry in the $_POST (or $_REQUEST) array to the new value. These have global scope and you can pick them up again in the OnSubmit box.

Bob
 
Report to moderator   Logged Logged  
 
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
  The administrator has disabled public write access.
#6719
admin (Admin)
Admin
Posts: 1570
graphgraph
User Online Now Click here to see the profile of this user
Re:Insert cf_id into the response email 3 Months, 2 Weeks ago Karma: 22  
Hi jeffw,

The autogenerated code is executed the last thing too so I don't think you can get the value at the onsubmit code!

Cheers

Max
 
Report to moderator   Logged Logged  
 
ChronoForms Developer Thanks for using ChronoForms.
If you have any problems with ChronoForms please tell us.
If you like ChronoForms please post a review at Joomla.org
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop


equalheight If you have any questions you can post to our forums and we will be glad to help ASAP

Members Login






Lost Password?
No account yet? Register

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for
goods and services provided by ChronoEngine.com

ChronoForms License

equalheightTo be able to continue working at this component we decided to get a small profit out of it but at the same time don't force everybody to pay in order to use this great component.

 

 From version 1.5 and up a link at the bottom of everyform created will be placed, saying "joomla professional work", the link will be to us here htttp://www.chronoengine.com, its illegal to remove this link from the source code unless you have a license,

so the license is very simply for the same ChronoForms component without a link, thats all!

This License is for 5 different websites ONLY. 

 

 However, in order to allow everybody to still use the component and even get out of this, the link is inside a div with class : chronoform , use this to hide the link by using different colors or whatever if you really can't pay, but of course the link is still exists at your page source.

 

The license is ONLY 25$ can be bought here :

 

Thank you!

 

ChronoEngine.com Team 

Joomla Templates and Joomla Tutorials