Catchall

Developer

Tom Jaeger - EE Harbor

3rd Party (Free)

Download v2.0.0

EE Version Support

  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Fieldtype

Tags

Speed up dev by not having to create a bunch of fields in the CP. Handy. The Catchall fieldtype is meant to be used with a SafeCracker Entry Form. It stores any form data you submit to it, flexibly adding fields on the fly. This is useful if you want to capture many fields of data without having to actually create all those custom fields. The Catchall fieldtype does not work without SafeCracker.

With the Catchall field, you determine which sub-fields it will contain by creating form inputs in your SafeCracker Entry form. It can store nested arrays of data, or a single row of data.

For instance, let’s say you wanted to capture some contact info with your entry form, in a Catchall field called customer_details:


{customer_details}
    {contact_info}<br />
        <label>Name</label>
        <input type="text" name="customer_details[contact_info][name]" value="{name}" /><br />
        <label>Address</label>
        <input type="text" name="customer_details[contact_info][address]" value="{address}" /><br />
        <label>City</label>
        <input type="text" name="customer_details[contact_info][city]" value="{city}" /><br />
        <label>State</label>
        <input type="text" name="customer_details[contact_info][state]" value="{state}" /><br />
        <label>Zip</label>
        <input type="text" name="customer_details[contact_info][zip]" value="{zip}" /><br />
    {/contact_info}
    {company_details}
        <label>Associates</label>
        <input type="text" name="customer_details[company_details][associates]" value="{associates}" /><br />
        <label>Printouts</label>
        <input type="text" name="customer_details[company_details][printouts]" value="{printouts}" /><br />
    {/company_details}
    <label>Company Name</label>
    <input type="text" name="customer_details[company_name]" value="{company_name}" /><br />
{/customer_details}

We have three rows of fields captured in our Catchall. The first row is a nested array of data, contact_info. The second is also a nested array, company_details. The last row is a single line of data, company_name.

To do the same thing within a SafeCracker {custom_fields} loop:


{if catchall}
    {contact_info}<br />
        <label>Name</label>
        <input type="text" name="customer_details[contact_info][name]" value="{name}" /><br />
        <label>Address</label>
        <input type="text" name="customer_details[contact_info][address]" value="{address}" /><br />
        <label>City</label>
        <input type="text" name="customer_details[contact_info][city]" value="{city}" /><br />
        <label>State</label>
        <input type="text" name="customer_details[contact_info][state]" value="{state}" /><br />
        <label>Zip</label>
        <input type="text" name="customer_details[contact_info][zip]" value="{zip}" /><br />
    {/contact_info}
    {company_details}
        <label>Associates</label>
        <input type="text" name="customer_details[company_details][associates]" value="{associates}" /><br />
        <label>Printouts</label>
        <input type="text" name="customer_details[company_details][printouts]" value="{printouts}" /><br />
    {/company_details}
    <label>Company Name</label>
    <input type="text" name="customer_details[company_name]" value="{company_name}" /><br />
{/if}

To display this data:


{exp:channel:entries channel="site"}
{customer_details}
    {contact_info}
    Name: {name}
Address: {address}
City: {city}
State: {state}
Zip: {zip}
{/contact_info} {company_details} Associates: {associates}
Printouts: {printouts}
{/company_details} Company Name: {company_name} {/customer_details} {/exp:channel:entries}

Converting from an existing SafeCracker Catchall fieldtype

If you previously owned and used the SafeCracker Catchall fieldtype, here are the instructions for converting your old safecracker_catchall fields to catchall fields. The functionality remains the same.

  • Upload the catchall/ folder to your third_party/ folder
  • Install the Catchall fieldtype (this installation will automatically convert your old safecracker_catchall fields to catchall fields)
  • In your templates, change all references to safecracker_catchall to simply catchall

Download Catchall

EE Support Downloads Add-On Version Release Date
2.2.0+ Download 2.0.0 Mar 1, 2011

This entry was created March 1, 2011, 11:33 am.
This entry was last updated April 15, 2019, 1:40 pm.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!