| Post |
|
Doug - Guest
10:09 pm - October 10, 2007
|
| |
|
Sorry, I don't see any difference at all in the code lines!
Am I wrong?
|
|
|
Oliver
- Admin
10:36 pm - October 10, 2007
posts 3549 |
| |
|
Oops. When I saved the post, something must have screwed up the code lines...fixed it.
Further, note that the single quotes here have been (for whatever reason) changed to back and forward ticks! When you replace the code make sure there are only single and double quotes.
|
|
|
daniel - Guest
9:27 pm - November 23, 2007
|
| |
|
Dear Oliver,
I would like to upgrade to 6.1 but it seams like the “Tell-A-Friend feature”-exploit (previously used to pass the post-id on to the ajax function) is no longer working.
Do you have any other ideas to get the post id accessible in the AJAX function.
Your help is much appreciated
|
|
|
daniel - Guest
11:14 pm - November 23, 2007
|
| |
|
[Solution]: To get access to the post ID inside the Ajax function in cform.php insert the following inside the cforms_submitcomment- function:
$search_str = '%'.get_current_page().'%';
$postID = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE guid LIKE '$search_str'");
|
|
|
Oliver
- Admin
9:51 am - November 24, 2007
posts 3549 |
| |
|
I double checked daniel, Tell-A-Friend works fine. So there should be no reason, that these two variables should not be set properly in the Ajax PHP part:
$Ajaxpid
$AjaxURL
If you'd like to utilize these outside of the T-A-F feature you simply need to remove the IF part around these two hidden fields in cforms.php.
There is another post in this forum discussing exactly that.
|
|
|
Mr. Tangent - Guest
2:15 am - May 9, 2008
|
| |
|
Oliver said:
A possible workaround (haven't tested it though) may be to utilize the 'Multiple form mail recipients' feature.
- Add the authors emails addresses to the cforms admin email setting: email1 (Joe), email2 (Pete), email3 (Mike)
- In your dynamic form include a multi-recipients field that gets 'build' at run-time (see examples below)
- Via CSS hide the entire input field, so users neither can see it nor change it
Hi Oliver, I am a newb at CSS. What is the best way to hide the css. I am using minimal.css
Here is the text from that section:
/* */
/* FORM FIELDS general formatting */
/* */
.cform input,
.cform textarea,
.cform select {
padding:3px;
border:1px solid #aaa;
font:0.9em Trebuchet MS,sans-serif;
color:#888;
background:#ffffff url(../images/field-bg-top.gif) repeat-x top left;
vertical-align:top;
}
.cform input:hover,
.cform textarea:hover,
.cform select:hover {
border: 1px solid #FFCC00;
background:#ffffff url(../images/field-bg-bottom.gif) repeat-x bottom left;
}
.cform input:focus,
.cform textarea:focus,
.cform select:focus {
color:#666;
background:#ffffff url(../images/field-bg-bottom.gif) repeat-x bottom left;
}
.cform textarea,
.cform input {
width:298px;
}
.cform select {
width:306px; /* attempt to have equal length */
}
.cform select.cfselectmulti {
height:7.5em;
}
.cform textarea {
font-family: arial;
font-size: 0.9em;
overflow:auto;
}
Please advise.
|
|
|
Oliver
- Admin
7:33 am - May 9, 2008
posts 3549 |
| |
|
Once your form is rendered, simply look at the HTML source code (you need to turn on input field IDs in the cforms Styling section) and identify your selectbox ID for the given field, e.g.
<select class="cformselect fldrequired" id="cf_field_6" name="data">...
In the CSS, add:
#cf_field_6 { display: none; }
Of course your ID will differ from "cf_field_6", which is merely an example.
|
|
|
Mr. Tangent - Guest
1:33 pm - May 9, 2008
|
| |
|
Oliver said:
Once your form is rendered, simply look at the HTML source code (you need to turn on input field IDs in the cforms Styling section) and identify your selectbox ID for the given field, e.g.
<select class="cformselect fldrequired" id="cf_field_6" name="data">...
In the CSS, add:
#cf_field_6 { display: none; }
Of course your ID will differ from "cf_field_6", which is merely an example.
Perfect! I really wish you would set up a Paypal donation page. I tried buying you something from the German Amazon but it was giving me an error and since I don't speak German I couldn't figure it out (even with Altavista's translation). Not to mention the weak dollar to euro made it equally expensive! The shipping cost from the U.S. Amazon was exorbitant! I want to pay you something though. Please, if you have paypal, write me back: tangent@mrtangent.com
|
|