Forums

Members name on email

edgecast 21 Jul, 2007
I seem to have access to the $my object in the autogenerated section,
<?php 
echo $my->name;
print_r($my);
exit;
?>


but it seems undefined when embedded in the form html,

<input type="text" name="email" value="<?php echo $my->email ?>" size="20" maxlength="80">


Any ideas? Oh .. found the solution. I'll post this anyway.
edgecast 21 Jul, 2007
Just make $my a global variable
<?php global $my; ?>
labp2 09 Aug, 2007
Hi!

I make a form to test, and work perfctly!

I put it:
<?php global $my; ?>
<input name='name' value='<?php echo $my->name ?>' />
<input name='email' value='<?php echo $my->email ?>' />


But in my main form it doesn't work!I make my test form exactly = my main form, and works -.- , but in my main form show this:

In email field:

 <script language=

After email field:
\n ' />
But when a copy it, It is pasted:
\n Este endereço de e-mail está sendo protegido de spam, você precisa de Javascript habilitado para vê-lo ' />

In English:
\n This email adress has been pretected for spam, you need Javascript habilited to see ' />


The test form is in a menu Link URL, Special. The main form is in a module Registered, i think it can be the problem.

What is wrong???Why in a form it works and other form exactly equals doesn't work??

-----------------------------------------------

One more thing, anybody use it with userextended?I can't put fields of userextend in my form..I fanybody knows plz tell me.


Best Regards
Luis Pacheco<br><br>Post edited by: labp2, at: 2007/08/09 16:58
GreyHead 10 Aug, 2007
Hi Luis,

The problem is that one of these forms is on a page that's using a JavaScript e-mail protector. The protector looks out for e-mail addresses and replaces then with a little snippet of JavaScript and that's what you are seeing.

Bob
labp2 10 Aug, 2007
How i remove it???And where is this protector?

Ty GreyHead!
GreyHead 10 Aug, 2007
Hi Luis,

If it's not something you've added then unpublish the 'Email Cloaking' mambot and see if that fixes it.

Bob
labp2 10 Aug, 2007
Hi GreyHead

It worked!!Thank you!!!
Why the Email Cloacking make it only with the module???

Best Regards
Luis Pacheco
GreyHead 10 Aug, 2007
Hi Luis,

From the Mambot help page:

The E-mail Cloaking works in all Content/Static Content Items, and also on those e-mail addresses entered into the Component Contacts. However, it will not work for e-mail addresses that are included in any of the Descriptions within Sections or Categories, or indeed elsewhere. It also will not work in pages contained within a Wrapper Component.

Bob
labp2 10 Aug, 2007
Thank you Bob!<br><br>Post edited by: labp2, at: 2007/08/10 15:38
This topic is locked and no more replies can be posted.