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

multiple field values to match Acymailing one custom field

5 years 8 months ago #24420 by assocyate
There is already a great integration with Acymailing. It works for me when I create one form but It will not work the same way when I will create another contact form.
For instance I have Acymailing custom field called 'source' with multiple choices; inquiry, optin, etc.
In Enhanced Contact I will create a hidden field with the same name 'source' with value 'inquiry' to match the value with custom field in Acymailing.
Then I would like to create another hidden field in Enhanced Contact to match value 'optin' to be used in another contact form.
Is there any way to accomplish this task? I can't have 2 hidden fields in Enhanced Contact with the same Alias name to match Acymailing's same field.

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

5 years 8 months ago #24422 by support
Dear assocyate,

I'm not sure I understood properly. What exactly is not working properly? Does it subscribe, but does not populate Acymailing's custom fields?
The AcyMailing Form Field should work properly in as many different forms as you want.

Is the value in the Hidden field matches exactly the value in AcyMailing's multiple choice?
Does the second form work if you enter the same value in the hidden field?

Best regards,

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

5 years 8 months ago #24423 by assocyate
I would not called that as not working properly... I think it might be more a design limitation. I might be however wrong and just didn't find the proper solution for my integration.
I have one contact form called 'inquiry' assigned to 'inquiry' category. In this form I have a hidden field called 'source'. The value in this field matches with one of the multiple choice field values in Acymailing . This works fine.
Now, I have another contact form called 'optin' assigned to another category 'optin'. In this form I want to have also 'source' hidden field but to match a different value for that corresponding 'source' multiple choice field in Acymailing.
A problem is that I cannot have in Enhanced Contact 2 fields with the same alias name 'source' to match 2 different values in 1 multiple choice Acymailing field.

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

5 years 8 months ago #24424 by assocyate
I wouldn't know exactly how to write it but should not be the case for php field? Create cases with the same values as found in Acymailing multiple choice field. If the case matches the category (with the same name) that is assigned to then it should show result with that name.
Am i trying to make it too complicated or there is not an easy solution for 2 different values from the same field and from 2 different categories to match 1 multiple choice filed in Acymailing?

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

5 years 8 months ago #24427 by support
Dear Assocyate,

In order to perform that you will indeed need a PHP Form Field with the following content:
$html = '';
$html .= '<input 
	 type=hidden
	 name="'.$cf->alias.'[]"
	 value="1" 
	 />';
$html .= '<input 
	 type=hidden
	 name="'.$cf->alias.'[]"
	 value="2" 
	 />';

Just change the value attribute.

However in order to work it required a lot of changes to Contact Enhanced. I'm in the process of testing the changes and I'll send a new package to you in the next 2 or 3 hours.

Best regards,

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

5 years 8 months ago #24431 by assocyate
Thank you,
I really value your hard work!

However, I remain a bit confused about this solution. How exactly the value is going to be matched against multiple choice field values in Acymailing? The value should have the name of category?

My field name is 'source' in Acymailing and have 2 values; 1 (inquiry) and 2 (optin). I assume that I assign EC php 'source' field to All Categories.

Can you please explain how to setup this?

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

5 years 8 months ago - 5 years 8 months ago #24432 by support
Dear assocyate,

The Form Field's Value does not have to the Contact Enhanced Category's name. If the value for all categories are the same for this PHP Form Field, then you can assign the field to All categories. However if you have different values for each category, then you need to create a different field for each category.

In both cases Contact Enhanced Form Field Alias must match the AcyMailing's Custom Field "Column name", and the PHP or Hidden Form Field Values must match the values of the AcyMailing Options.

Please see screenshots below of the Contact Enhanced PHP Form Field and ]AcyMailing Custom Field in my test environment.

Let me know if you need any further assistance.

Best wishes,
Attachments:

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

5 years 8 months ago #24440 by assocyate
Thank you for further explanation. I already understood how to integrate both extensions together.
Unless, I am missing something obvious and wasting your time, I still don't know how fields are matched between both fields.

Again, I have 2 different contact forms with alias name 'source' hidden php field that contains your code and values {7} and {8} and Acymailing single drop-down field with column name 'source' and the same values {7} and {8}. This 'Source' field is assigned to All Categories. Please note I can have ONLY 1 field in Acymailing.
What should happen is:
1. First submitted contact form called inquiry should insert value {7}
2. Second submitted contact form called optin should insert value {8}

Obviously, in my setup this does not work.
What factor should determine which value in contact field should match the value in Acymailing field?
Attachments:

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

5 years 7 months ago #24459 by assocyate
Sorry, I am still remained puzzled how I could accomplish this task. it would be great if I could enable this feature. Any chance you could reply to my email?

thank you!

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

5 years 7 months ago #24460 by support
Dear Assocyate,

If you have a hidden field assigned to all categories the same value will be submitted to all forms in all categories, therefore if you want different value(s) submitted you should assign the field to a specific category and only add the value you want for that category.
You can have the field alias in different categories, as long as there's no field with the same alias assigned to all categories.

In this case in Contact Enhanced PHP Form Field you only need one input and not two.

When you wrote "multiple field values to match Acymailing one custom field" I assumed you wanted to submit more than one value to the same AcyMailing Custom Field at the same time.

Best regards,

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

5 years 7 months ago #24461 by assocyate
That has been my idea all along! For some reason with different assigned categories I could have not assigned the same alias before and I assumed that was not possible.
As it happened I was wrong and I must have made some mistake before. I have tried again now and and it is working fine.
Hmm...

Thanks again!

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

5 years 7 months ago #24462 by support
Dear Assocyate,

I'm glad it is solved! ;-)

Let us know if you need any further assistance.

Have a blessed weekend.

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