Forums

CapsuleCRM Web to lead form

kmedri 26 Oct, 2010
I am trying to create a web to lead form for capsule CRM. The problems I am having are:

[list]The form does not seem to validate correctly, I can submit the form without entering the image verification field[/list]
[list]The emails are not being sent (I have tested Joomla and it sends emails ok)[/list]
[list]I cannot enter a unique name in the 'name' in the 'checkbox' field without altering the HTML[/list]
I am using Joomla 1.5.21.
Thank you for your help.
GreyHead 27 Oct, 2010
Hi kmedri,

Please post a link to the form so we can take a quick look.

Bob
kmedri 27 Oct, 2010
Hi Bob,
I have got it to work, however it is not being recieved correctly by CapsuleCRM. I am using the cURL plugin. When I debug it shows [check0] Array, the problem is the number it adds to the end of the arrays eg Web [1] etc.

1. Form passed first SPAM check OK
2. Form passed the submissions limit (if enabled) OK
3. Form passed the Image verification (if enabled) OK
4. Form passed the server side validation (if enabled) OK
5. $_POST Array: Array ( [FORM_ID] => 6d9b49e4-4da8-4e66-bac4-b4927c1c89d1 [COMPLETE_URL] => http://netright.co.nz [FIRST_NAME] => Bob [LAST_NAME] => Smith [ORGANISATION_NAME] => Smiths Hire [PHONE] => Array ( [WORK] => 033102499 ) [EMAIL] => [email]kmedri@snap.net.nz[/email] [check0] => Array ( [0] => Web [1] => Print [2] => Video ) [NOTE] => Test7 [chrono_verification] => uD7S2 [button_11] => Submit [ff02f36784c035e3c242fbb095191bbd] => 1 [1cf1] => 33411275bb38066e7e2f749d86752a0d [chronoformname] => Web_to_Lead )
6. $_FILES Array: Array ( )
7. Form passed the plugins step (if enabled) OK
8. An email has been SENT successfully from (Admin)kevin@netright.co.nz to [email]admin@netright.co.nz[/email]
9. An email has been SENT successfully from (Kevin Medri)kevin@netright.co.nz to [email]kmedri@snap.net.nz[/email]
10. Debug End
11. Redirect link set, click to test:
http://netright.co.nz



Also is it possible to two curl instances, ie directed to capsuleCRM and a SMS service.
Kev
GreyHead 30 Oct, 2010
Hi Kemdri,

You don't say what format CapsuleCRM requires. There is no 'Number added to the end of the value', it's just that the values are being returned in an array, that's normal for a checkbox group.
[check0] => Array ( 
  [0] => Web 
  [1] => Print 
  [2] => Video 
) 

If you need some other configuration then you can process the results in the OnSubmit before box for the form or the plug-in.

See also this post from earlier today on a very similar topic.

Bob
kmedri 30 Oct, 2010
Hi Bob,

Thanks for the push to the other post, some great info however it has not helped me. For capsule to work when using a checkbox I need to identify the checkbox name as "TAG" and then have the options set to whatever the options are in the CRM, in my case "Web, Print, Video"
In the other post it suggests adding a unique name in each option, which I cannot do as it has to be "TAG" for capsule to recognise it. So what happens is, if someone chooses more than one option, only one is returned. This is the code I nned to acheive for the checkbox to work with capsule:
<input value="Web" title="Please choose an option. Thank you." class="radio validate-one-required" id="check00" name="TAG" type="checkbox" />
      <label for="check00" class="check_label">Web</label>
      <br />
      
<input value="Print" title="Please choose an option. Thank you." class="radio validate-one-required" id="check01" name="TAG" type="checkbox" />
      <label for="check01" class="check_label">Print</label>
      <br />
      
<input value="Video" title="Please choose an option. Thank you." class="radio validate-one-required" id="check02" name="TAG" type="checkbox" />
      <label for="check02" class="check_label">Video</label>

I also notice that cURL uses [] for the arrays, this causes another issue. When capsule recieves a phone number or address it can be allocated to work, home etc, in order to do this the name of the text box needs to be "PHONE[WORK]" or "PHONE[HOME]" etc, example of code needed:
<label class="cf_label" style="width: 150px;">Phone Number *</label>
    <input class="cf_inputbox required validate-number" maxlength="150" size="30" title="Please enter a valid phone number. Numbers only. Thank you." id="text_3" name="PHONE[WORK]" type="text" />

Unfortunately when using cURL it converts the [WORK] or [HOME] into an array and removes it from the NAME field:
[PHONE] => Array ( [WORK] => 0331

Any ideas
Many thanks
Kev
GreyHead 31 Oct, 2010
Hi Kev,

I had a quick look at the Capsule CRM docs - and am not much the wiser (except that they seem to prefer XML). I see there is a PHP library that might help you.

The current version of the cURL plug-in simply doesn't handle arrays well :-( I have a fixed version that you can test but it uses different helper files and may not work with the other plug-ins if you need any of them.

Other than that I guess the workaround is not to use the plug-in but to hand-code the CURL request - it's not too difficult.

Bob
kmedri 01 Nov, 2010
Thanks Bob,
Could I have a link for your version of the cURL plugin and I will see if it works.
By the way just downloaded your book, fantastic, opens a whole new realm when it comes to chronoforms!
Kev
This topic is locked and no more replies can be posted.