Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#49 2007-11-01 14:31:53
- sazan1978
- New Member
- Registered: 2007-10-31
- Posts: 2
Re: zem_contact_reborn 4.0.3.20
zem_contact_secret is exactly what I needed — I should have read the documentation more carefully.
I do want the text to show up in emails, but not to be visible to the submitter: just what _secret does. Thanks everybody for your suggestions!
Offline
Re: zem_contact_reborn 4.0.3.20
Is there a way to attach a file to a message? I would like to have the visiters fill out the contact form and attach a picture (jpg or gif).
Offline
Re: zem_contact_reborn 4.0.3.20
keukenkikker wrote:
Is there a way to attach a file to a message? I would like to have the visiters fill out the contact form and attach a picture (jpg or gif).
you’d have to use something like sed_afu
Offline
Re: zem_contact_reborn 4.0.3.20
keukenkikker wrote:
Is there a way to attach a file to a message? I would like to have the visiters fill out the contact form and attach a picture (jpg or gif).
Not without hacking the plugin code. It requires a MIME-encoded email format.
Offline
Re: zem_contact_reborn 4.0.3.20
Hello,
I can’t seem to access the values for zem_contact_secret to do a bit of processing before sending,
Thanks in advance
Last edited by anthonybooth (2007-11-08 07:21:59)
Forever learning.
Offline
Re: zem_contact_reborn 4.0.3.20
What kind of processing do you want to do? Perhaps you can already do the processing inside the zem_contact_secret container tag.
Offline
Re: zem_contact_reborn 4.0.3.20
Morning Ruud
I have three forms one I use to calculate a cost by qty, a PayPal _xclick and the ZCR to capture details.
The idea is that the user enters a qty to calculate a cost this in turn generates the PayPal _xclick button and an
alternative ZCR order form for those not wanting to use PayPal.
Everything works except I need to re-enter the qty in the calculation form and redo the calculation if the ZCR form has validation errors.
The ZCR secrets hold the qty and amount which I preg_replace their values. If I attach hInput()’s with callback to use instead, my dilemma is that these are not sent via email. If I preg_replace a normal ZCR text field with the qty it works so I know I can access the normal fields just not secret.
I know I can generate my own form and do my own validations but this takes away the flexibility of placing any ZCR form within the tags of my enclosing plugin for instance if they wanted to add more capture fields.
Thanks for your reply
Forever learning.
Offline
Re: zem_contact_reborn 4.0.3.20
Dirty trick, which may need some extra safeguards to clean up unwanted input:
<txp:zem_contact_secret><txp:php>
echo ps('name_of_your_hInput');
</txp:php></txp:zem_contact_secret>
Combine that with a hInput and I think it’ll work.
Last edited by ruud (2007-11-08 10:36:05)
Offline
Re: zem_contact_reborn 4.0.3.20
Hello Ruud
Based on your idea I attached three new fields one hInput and two for the secret within the plugin:
function add_fields(){
global $qty,$amount;
$field = hInput('cal_quantity',$qty)."\n".
zem_contact_secret(array('label'=>'Quantity', 'name'=>'quantity', 'value'=>$qty)).
zem_contact_secret(array('label'=>'Amount', 'name'=>'amount', 'value'=>$amount));
return $field;
};
This worked a treat the hInput for the process and secret for sending and it still leaves the ZCR flexible if he wants additional fields.
And you know clients, they will play:) So thank you for the direction.
A question: is there a reason you can’t access the secret values like all the other form variables using a ps()?
Forever learning.
Offline
Re: zem_contact_reborn 4.0.3.20
The “secret” values are never transmitted through the form. They are only known server-side, so they are really secret ;)
BTW, in my example you can use ps() instead of gps()
Offline
#59 2007-11-08 15:57:54
- kevinmcdougall
- Member
- Registered: 2007-02-08
- Posts: 55
Re: zem_contact_reborn 4.0.3.20
Anyone seen this before or know why my ZCR form keeps having the following automatically inserted (sometimes multiples of) at every opening fieldset tag?
<input type="hidden" name="phpMyAdmin" value="94TsMm5TjIOtE54i96UwaovhBGb" />
Never causes any problems, just plain weird though.
And it doesn’t happen with all forms, all the time. Although there must be, there appears to be neither rhyme nor reason and I’ve used ZCR for a while and never encountered it before. I have modded the plugin a wee bit, but only to make a JS call when there are validation errors, so that doesn’t seem like the culprit
Last edited by kevinmcdougall (2007-11-08 16:02:55)
Offline
Re: zem_contact_reborn 4.0.3.20
ZCR doesn’t insert that input field.
Offline