[solved]Email field content

More
11 years 9 months ago - 11 years 9 months ago #33173 by rottenberg
Hello
I have an article which is linked with a RSform pro component.
In the article I have an email field which may accept more than one mail.

This addresses need to be included in the RSform page.

To do that I'm using a $_SESSION variable which contains the email address.
Presently it doesn't contain the addresses but the javascript used to hide the addresses.

I have tried to use the plugin {emailcloak=off}, I have also tried to unactivate the Joomla plugin which controls the email buffers.
It was unsuccessfull.

I have found the post flexicontent.org/phpbb/viewtopic.php?f=2...il+javascript#p30751 Access mail address from email field in template.

I have put the field in the renderonly field in the template and I have entered the following text in the prefix text of every value :
Code:
{source 0}<?php $_SESSION['mail'][] = $item->field['email_vendeur']->value[0]['addr'];?>{/source}
{source0}...{/source} is a nonumber plugin which allow s to execute a php script.

I get nothing in the $_SESSION buffer.

How can I transfer the raw text email in the form ?

thank you for help

best regards
Michel
Last edit: 11 years 9 months ago by rottenberg.

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #33184 by ggppdk
Replied by ggppdk on topic [solved]Email field content
NOTE: You do not create the field's 'display' HTML in order to access its raw value! so you do not field in the RenderOnly position

WHAT is happening, is that you do not have error reporting on otherwise you would see that the variable does not exist,
1. e.g. in item view it is $this->item and not $item
2. also it is ->fields and not ->field
3. and the values of the field ->value[n] are serialized:

In order to print the value and see what is available try:
Code:
$fval = unserialize($this->item->fields['email_vendeur']->value[0]); echo "<pre>"; print_r($fval); echo "</pre>";

For a more complete answer please read:
Using the raw value of a field inside a template file


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #33211 by rottenberg
thank you very much.

Now it's working ;) great !.

best regards

Michel

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.341 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline