Română (România)English (United Kingdom)



 
If you use aiContactSafe, please post a rating and a review at the Joomla! Extensions Directory.

Field to display Title and Username

Field to display Title and Username

Hi,

First Question:
I'd like to use the ai contact module to allow people to give feedback on lots of different pages. As the module will be displayed on many different pages, I need to include a special hidden field to display what page (I guess the page Title is best) the user was on re the feedback.

EG. I'll have the same aicontact module on 3 pages; PCs, Macs, Other. The module will allow people to type in their feedback on a particular page. So John Smith goes to the Macs page and types 'great page'. So when the site owner gets the email, it will contain the 'great page' feedback and 'Macs', to show the feedback is to do with the Macs page.

Second Question:
I'd also like to include the Joomla username and name of the person giving the feedback. Is that possible?

Many thanks for your help in advance and thanks for this great extension, I love it!

Cheers,
Bob.

Bob Jenson
useravatar
Offline
2 Posts
User info in posts
Administrator has disabled public posting

Re: Field to display Title and Username

Hi,

Bob Jenson wrote:


First Question:
I'd like to use the ai contact module to allow people to give feedback on lots of different pages. As the module will be displayed on many different pages, I need to include a special hidden field to display what page (I guess the page Title is best) the user was on re the feedback.

You can do this only by modifying the code of the extension.
First you need to add the hidden field and then modify the module code to send in it any information you think is relevant.
You can even have more then one hidden fields.

Bob Jenson wrote:


Second Question:
I'd also like to include the Joomla username and name of the person giving the feedback. Is that possible?

Yes, you need to retrieve them and then send them in other hidden fields.

You will need some php knowledge.
If you use the module you need to modify the file modules\mod_aicontactsafe\mod_aicontactsafe.php and add above the line :

Code:

$postData[JUtility::getToken()] = 1;

something like this:

Code:

$postData['aics_field_name'] = $value_to_record;

This will send in the field "aics_field_name" the value in $value_to_record.

Alex Dobrin
Algis Info Grup

Follow me on Twitter

Alex Dobrin
useravatar
Offline
3323 Posts
User info in posts
Administrator has disabled public posting

Re: Field to display Title and Username

Thanks for the reply Alex. Unfortunetely I'm not great on PHP but thanks for the info anyway.

Bob Jenson
useravatar
Offline
2 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1306
Total Polls:
0
Total Posts:
5894
Average Posts Per Hour:
1.0
User Info:
 
Total Users:
22096
Newest User:
cac2s
Members Online:
0
Guests Online:
131

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked