Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#51 2007-11-05 17:06:31

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

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

#52 2007-11-05 17:21:31

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#53 2007-11-07 23:58:51

anthonybooth
Member
From: UK
Registered: 2007-01-13
Posts: 21
Website

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

#54 2007-11-08 07:48:19

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#55 2007-11-08 08:19:49

anthonybooth
Member
From: UK
Registered: 2007-01-13
Posts: 21
Website

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

#56 2007-11-08 09:05:27

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#57 2007-11-08 10:03:27

anthonybooth
Member
From: UK
Registered: 2007-01-13
Posts: 21
Website

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

#58 2007-11-08 10:35:43

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#60 2007-11-08 17:24:09

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

ZCR doesn’t insert that input field.

Offline

Board footer

Powered by FluxBB