By Robgunner on Friday, 02 November 2018
Posted in General Issues
Likes 0
Views 624
Votes 0
Hi Team

I want to add a text field into the registration form, so that a member has to enter text.
My question is their a way to get that field to output to admin email along side user name and email.

Kind regards
Rob
You can add new custom field from your site backend > Easysocial > Custom field > workflow > edit your 'User Workflow' > http://take.ms/u3Nrg || http://take.ms/EEDAQ , so it will display on the registration form http://take.ms/tUXQs .
·
Friday, 02 November 2018 18:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

If I understand your question correctly, do you mean that you want to add a text field to output to admin email into your User Workflow?

If yes, you can add it which is at Backend > EasySocial > Customs Fields > Workflows > User Workflow.
·
Friday, 02 November 2018 19:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex and Irwin

I think you misunderstood me, I know how to add to registration etc, what I want to know is can I output the new field on registration to the admin email when a member registers

So user registers, fills in new field, admin get new user registration email with username/email/ new field

Kind Regards
Rob
·
Friday, 02 November 2018 19:47
·
0 Likes
·
0 Votes
·
0 Comments
·
I am sorry that i still not really understand your current question.

Do you mean you already added this new custom field from this user workflow.

But now you want site admin to get this new custom field value from the email when the system notify this site admin there got new registered user sign up on the site?
·
Saturday, 03 November 2018 11:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

Sorry I wasnt that clear in my explanation.

Yes I have added a field to the registration workflow and I would like the admin to receive this custom field in the notification email along with the username and email, is this possible to add the custom field to admin email?

Kind Regards
Rob
·
Saturday, 03 November 2018 13:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Its probably been answered and asked before, I have been reading through and think this can be added into the admin alert new user email template to add textbox-13 etc is that right?

Sorry I know its the weekend and look forward to your reply
·
Saturday, 03 November 2018 14:07
·
0 Likes
·
0 Votes
·
0 Comments
·
so can I add the below to moderate user email

<td style="padding: 5px 0;">
<?php echo JText::_('COM_EASYSOCIAL_REGISTRATION_TEXT-13'); ?>: <?php echo $text-13;?><br />
</td>
</tr>
<tr>

Would that work or no?
·
Saturday, 03 November 2018 14:35
·
0 Likes
·
0 Votes
·
0 Comments
·
No problem Rob.

It seems like currently that is no easy way to achieve this unless modify the Easysocial core file.

May i know which custom field you would like to retrieve it?

Is it possible for you update your site backend protection username and password so we can better have a check your current Easysocial setting ?
·
Saturday, 03 November 2018 14:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

Ok thank you ill leave for now.

Yes I will update, which setting as EasySocial fine was just a question mate

Kind Regards
Rob
·
Saturday, 03 November 2018 14:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Basically you can try this following code, add into that email template php file.


<?php

$db = ES::db();
$query = 'SELECT `id` FROM ' . $db->nameQuote('#__users') . ' WHERE `username` = ' . $db->Quote($username);

$db->setQuery($query);
// Retrieve the user id which registered on the site
$userId = $db->loadResult();

$userData = ES::user($userId);
// set your CUSTOM FIELD UNIQUE KEY
$uniqueKey = '';
$customFieldValue = $userData->getFieldValue($uniqueKey);
?>

<?php if ($customFieldValue) { ?>
<tr>
<td style="padding: 5px 0;">
<?php echo JText::_( 'Extra Info' ); ?>: <?php echo $customFieldValue;?>
</td>
</tr>
<?php } ?>



Check your custom field unique key from backend http://take.ms/w1iJ4 , then put this key into above code $uniqueKey = '';
e.g. $uniqueKey = 'school-start';

It also depend on what kind of custom field you want to retrieve, different custom field have to use different code.

For this example is, I use the textbox custom field.
·
Saturday, 03 November 2018 15:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

Thanks for your reply and I want to add a textbox custom field like you have.

So I need to add that code into the confirmation_approval.php on email template template editor is that right using $uniqueKey = 'textbox-13';

Kind Regards
Rob
·
Saturday, 03 November 2018 15:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Are you using this registration type 'Require user confirmation and admin approval'?

If yes, that is the correct email template file and that unique key must check it from your workflow.
·
Saturday, 03 November 2018 21:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

I use admin approval for registration type

I have set up the workflow and have the unique key just want this custom field to show in admin approve/deny email

Kind Regards
Rob
·
Sunday, 04 November 2018 16:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Then you have to modify this email template file moderator.approvals.php.
·
Sunday, 04 November 2018 20:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

With the same code as above do I copy into moderator.approvals.php and change the unique key, do I need all the above code into the same file?

Kind Regards
·
Monday, 05 November 2018 21:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, you need above all the code and update the unique code as well.
·
Monday, 05 November 2018 22:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

Sorry to sound thick, do I just paste at the end and change the unique key.
Thanks for your time on this.

Kind regards
Rob
·
Monday, 05 November 2018 23:40
·
0 Likes
·
0 Votes
·
0 Comments
·
You can download my attached file and replace into this template override file location.

JoomlaFolder/templates/yourCurrentTemplate/html/com_easysocial/emails/registration/moderator.approvals.php

For those new folder you have to manually create it, then edit this php file again, make sure inside the unique key you have to change it.
·
Monday, 05 November 2018 23:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

Thank you and will test and let you know, really appreciate your time on this.

Kind Regards
Rob
·
Tuesday, 06 November 2018 16:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

I downloaded the file, changed the unique key

I had to create the following folders manually /com_easysocial/emails/registration and copied the file into the folder, cleared the cache and as you see screenshot the custom field is not appearing.

Kind Regards
Rob
·
Tuesday, 06 November 2018 16:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you update your site backend authentication username and password http://take.ms/gpqv9 so we can better have a check?
·
Tuesday, 06 November 2018 17:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

Yes I will when home, thanks for your time.

Kind regards
Rob
·
Tuesday, 06 November 2018 19:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Keep us update then.
·
Tuesday, 06 November 2018 20:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

It works fine, I redone this morning and its working fine I think I may have removed a '
Thanks for your time on this

Kind Regards
Rob
·
Wednesday, 07 November 2018 15:18
·
0 Likes
·
0 Votes
·
0 Comments
·
You're most welcome.

Just for your information, I have locked and marked this thread as resolved to avoid confusions in the future. Please start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiries.

Thanks for understanding
·
Wednesday, 07 November 2018 15:34
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post