Support Forum

Every time that you post a problem, PLEASE add the Joomla and the extension's versions and revisions (for example: Joomla 3.3.6, Contact Enhanced 3.3.5), PHP version and Server's Operating System. If you only manage only one site it is easier if you edit your profile and just add that information to your signature. Don't forget to add a detailed description of the problem. If possible, write down all steps to simulate the problem.

Before submitting a new post, PLEASE make sure you are running the latest version, test in different browsers (IE, FF, Chrome,..) and clear Joomla and browser's cache after every change you make.

Also, most questions are already answered in our FAQ and in iFAQ and Contact Enhanced documentation pages.

× Contact Enhanced is a contact component manager created to replace Joomla! core contacts component and add lots of advantages and new features (see Features ) and it offers many plugins and modules for several different purposes,
Product page | Documentation Page

Passing Contact form name to Acymailing custom field

6 years 1 month ago #23986 by assocyate
Hi,

I am aware of matching Acymailing custom fields names with CE aliases which is great. However, I would need also passing to Acymailing hidden field of contact_id or contact form name. Is there a way that I can accomplish that?

Additionally, I would like to validate the name field to require two strings (first and last name) Would you kindly help me with that?

thank you

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

6 years 1 month ago #23987 by support
Dear assocyate,

1. We can easily get the Contact ID and the Document Title. Will that work for you?
You can create a PHP Form Field Type and the the content to:
$html = '<input 
	 type="hidden" 
	 id='.$cf->alias.' 
	 name='.$cf->alias.' 
	 value="Contact Id: '.$input->get('id').' - '.$doc->getTitle().'" 
	 />';

Then hide the Field's label under the Form Field's General Parameters tab and create an Acymailing Field with the same alias.


2. In order to do that you can create a Surname Form Field type.

Best regards,

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

6 years 1 month ago #23988 by assocyate
Thank you, that works for me.
At the second point creating a surname will not work in my case. I need to have just a one field (name) that will contain 2 strings thus a need for a validation.

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

6 years 1 month ago #23996 by assocyate
Alternatively, is there a way to use php form field to combine 2 separate text form fields (first & last name) into a hidden name form field? That way I could have Joomla Name field populated with first and last name together and then the same first and last name separated into 2 Acymailing custom fields.

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

6 years 4 weeks ago #23997 by support
Dear assocyate,

I'm sorry about the delayed reply.

Yes, it is possible and it is not hard to implement. See screenshot

Under the Name Parameters set:
Validation: Custom Validator
Validator Name: hasSpace
Error Message: Please enter your name and last name
Test (Validation):
(value.indexOf(' ') > 0);

Best regards,

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

6 years 4 weeks ago #24003 by assocyate
Thank you,

This works, however at the moment one space character validates. Can I have a space and at least 3 characters as a requirement?

One more question please, can I use php custom field to store ID of recorded message? If I can then how? Also, I would greatly appreciate if you could address my question about combining first & last name from 2 separate text fields into one hidden custom field...

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

Powered by Kunena Forum

Copyright © 2018 IdealExtensions.com. All Rights Reserved.

This site is not affiliated with or endorsed by the Joomla!™ Project. It is not supported or warranted by the Joomla!™ Project or Open Source Matters™. The Joomla!™ logo is used under a limited license granted by Open Source Matters™, the trademark holder in the United States and other countries.
We may collect your IP address and your browser's User Agent string while using our site for security reasons and deriving aggregate information (analytics). This information is retained for a minimum of 1 and a maximum of 24 months.
Feedback