How to use custom fields with CRDonationAPI

Options

I created a ghost form with some custom fields - "Designation", "AllocationCode", etc.

In html form created hidden fields to map to ghost form fields :

<input type="hidden" name="Designation" id="Designation" />

<input type="hidden" name="AllocationCode" id="AllocationCode" />

It doesn't look like it's connecting with ghost form as I don't see the values in the Thank You email (again custom programmed and working with other non-API forms).

What am I missing?

Is there a way to verify custom field values in Convio system after submission?

Thanks,

-serge

Tagged:

Comments

  • From the donate method doc.:



    To set a custom field with this method, the name of the API parameter is derived from the
    "Data Element Name" provided for the custom field.
    The Data Element Name is converted into a valid identifier by converting all letters to lower
    case
    and replacing all non-alphanumeric characters with underscores.
    So a Data Element Name of "My Custom String" should be passed into the donation API as "my_custom_string".

    So the form field names should be "designation" and "allocationcode". I think the custom fields can be included in some donation reports, but I don't remember which ones.

  • Looks like you just need to convert the field names to lower case (and of course include some value). Per the documentation of the donate method at http://open.convio.com/api/apidoc/ ...

    Custom Fields


    In the Donation Management application, administrators can define new custom fields to add to donation forms. To set a custom field with this method, the name of the API parameter is derived from the "Data Element Name" provided for the custom field. The Data Element Name is converted into a valid identifier by converting all letters to lower case and replacing all non-alphanumeric characters with underscores. So a Data Element Name of "My Custom String" should be passed into the donation API as "my_custom_string". Note that the "Data Element Name" is the same across all donation forms, and is not the same as the label that you actually specify in the form.

  • Noah Cooper:

    Looks like you just need to convert the field names to lower case (and of course include some value). Per the documentation of the donate method at http://open.convio.com/api/apidoc/ ...

    Custom Fields


    In the Donation Management application, administrators can define new custom fields to add to donation forms. To set a custom field with this method, the name of the API parameter is derived from the "Data Element Name" provided for the custom field. The Data Element Name is converted into a valid identifier by converting all letters to lower case and replacing all non-alphanumeric characters with underscores. So a Data Element Name of "My Custom String" should be passed into the donation API as "my_custom_string". Note that the "Data Element Name" is the same across all donation forms, and is not the same as the label that you actually specify in the form.

    Oops, Jeff beat me to it!

  • Thanks guys! It works now.

    -s

Categories