ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Matrix - P&T DD - SAEFcracker

February 18, 2012 3:23pm

Subscribe [1]
  • #1 / Feb 18, 2012 3:23pm

    a la mode

    168 posts

    Not sure where to start here. I am working on a site that has very specific needs. I ended up needing to cram a bunch of fields in a matrix fieldtype to accomplish the main set. Now there has been an added requirement that would be much easier with USER/SAEF forms. I thought I had a good grip on this, but adding in these fields as needed while keeping the styling has proven to be quite difficult. This could be due to my lack of experience with SAEF forms too though.

    My fieldtype is as follows: (I know it’s janky to read on here

    Matrix Configuration
    Address   Address 2   City       State         Zip Code   Public
    (text)      (text)        (text)      (P&T DD)    (text)      (P&T DD)
    So in my SAEF form, I have tried almost everything I can think of and haven’t succeeded yet. I am also having trouble finding any help online.

    Now in the form I have the following right now:

    {address} == the matrix field

    {state} == P&T Dropdown

    Even when removing the state segment though, the form seems to break with the opening and closing {address} tags.

    {address}
    
                            <div class="form_element">
    
                                <input type="text" name="address_1" id="address_1" value="{address_1}" />
    
                                <label for="address_1">Address</label>
    
                            </div>
    
                            <div class="clear"></div>
    
                            <div class="form_element">
    
                                <input type="text" name="city" id="city" value="{city}" />
    
                                <label for="city">City</label>
    
                                <select name="state">
    
                                    {options:state}
    
                                        <option value="{option_value}">{option_value}</option>
    
                                    {/options:state}
    
                                </select>
    
                                <label for="state">State</label>
    
                                <input type="text" name="zip" id="zip" value="{zip}" />
    
                                <label for="zip">Zip</label>
    
                            </div>
    
                            <div class="clear"></div>
    
                        {/address}

    Thanks everyone…

    Brian

  • #2 / Feb 19, 2012 1:38pm

    Dan Decker

    7338 posts

    Hi Brian,

    It is entirely possible to use Matrix and other third-party field types in SAEFs.

    What is unclear in your post though is the means you are using for SAEF. If you are using SafeCracker, it would be helpful for us to see the entirety of the template.

    Are you using these to edit existing entries, or to make new entries?

    What version of ExpressionEngine are you using?

    I’ll be happy to do what I can to help, but I suggest you post to Pixel and Tonic as well for clarification on how to use their fieldtypes with SafeCracker.

    Cheers,

  • #3 / Feb 19, 2012 1:48pm

    a la mode

    168 posts

    Dan,

    Thanks for the response.

    I am using this one to create a new entry.

    I am using EE v.2.3.1 - Build Date: 20111017

    Here is the template in its entirety:

    <div id="new_profile">
     {exp:safecracker channel="_member" return="members/ENTRY_ID" logged_out_member_id="1"}
         <!-- Required Fields to match User Menu -->
         <input class="hidden" type="text" name="title" id="title" value="{first_name}_{last_name}" size="50" maxlength="100">
         <input class="hidden" type="text" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50">
            <fieldset>
                <legend>Basic Information</legend>
                <section>
                    <div class="form_element">
                        <input type="text" name="first_name" id="first_name" value="{first_name}" />
                        <label for="first_name">First Name</label>
                    </div>
                    <div class="clear"></div>
                    <div class="form_element">
                        <input type="text" name="last_name" id="last_name" value="{last_name}" />
                        <label for="last_name">Last Name</label>
                    </div>
                    <div class="clear"></div>
                    {address}
                        <div class="form_element">
                            <input type="text" name="address_1" id="address_1" value="{address_1}" />
                            <label for="address_1">Address</label>
                        </div>
                        <div class="clear"></div>
                        <div class="form_element">
                            <input type="text" name="city" id="city" value="{city}" />
                            <label for="city">City</label>
                            <select name="state">
                                {options:state}
                                    <option value="{state}"{selected}>{state}</option>
                                {/options:state}
                            </select>
                            <label for="state">State</label>
                            <input type="text" name="zip" id="zip" value="{zip}" />
                            <label for="zip">Zip</label>
                        </div>
                        <div class="clear"></div>
                    {/address}
                    <div class="form_element">
                        {phone_number}
                            <input type="text" name="suffix" id="suffix" value="{suffix}" />
                            <input type="text" name="prefix" id="prefix" value="{prefix}" />
                            <input type="text" name="area_code" id="area_code" value="{area_code}" />
                            <label for="Phone">Phone</label>
                        {/phone_number}
                    </div>
                    <div class="clear"></div>
                </section>
            </fieldset>
     {/exp:safecracker}
    </div>

     

  • #4 / Feb 19, 2012 4:56pm

    a la mode

    168 posts

    Dan,

    I have also asked a related question regarding FT’s at P&T with Brandon,

    Thanks,

  • #5 / Feb 23, 2012 5:37pm

    Kevin Smith

    4784 posts

    Thanks for the update, Brian. Have you heard anything back yet from the guys at P&T?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases