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.

Additional Custom Fields Displayed to Premium Members

September 13, 2011 12:40pm

Subscribe [2]
  • #1 / Sep 13, 2011 12:40pm

    neale

    1 posts

    Hi,

    There may be an easy solution to this and if so I apologise but basically I have a channel where users can upload information about themselves/ their company, what i’m looking to do is offer a premium service whereby if they pay they get additional custom fields within this channel.

    Is there a way to add/limit the custom fields within a channel based on member group?

    Also if possible I would like to eventually automate this process i.e. anyone can sign up to an account and pay to upgrade to a premium account. When they upgrade they automatically get move to a specified member group.

    If anyone has any suggestions or useful links then I would be grateful to hear them.

    Thanks,

    Neale

  • #2 / Sep 13, 2011 4:57pm

    W3 | 84ideas

    22 posts

    Hi Neale,

    How are they submitting data? Through the front-end I suppose? Are you using a separate channel, or the member fields?

    In any case, I think it’s a matter of writing some conditionals to show/hide the additional form fields, for example based on the user group, or otherwise you could use categories for it.

    Automating can also be done that way. After payment you could update the user group or category dynamically.

    Hope this helps. Otherwise give some more detailed information, might be able to help better that way.

    Cheers,
    Mike

  • #3 / Sep 14, 2011 8:35am

    neale

    1 posts

    Hi Mike thanks for the reply.

    I am fairly new to EE so i’m not sure i’m going about it the right way but to my understanding.

    I can use a safecracker form to allow guests to post basic content about the schools then when the upgrade/are moved member groups they can add additional items to the form.

    I am still unsure on a few areas if you are able to help.

    I am right in thinking that you can also edit via the frontend and use all the filetypes provided in the backend such as multiple selects and file uploads?

    This is currently how i’m entering data, at the moment the multiple selects dont work and neither does the logo but it should give you an idea of what i’m trying to do.

    {exp:safecracker channel="schools" return="site/index" preview="site/entry"}
    
        <label for="title">School Name</label>
        <input type="text" name="title" id="title" value="{title}" size="40" maxlength="100">
        <br>
        
        <label for="address">Address</label>
        <textarea id="address" name="address" rows="5" value="{address}"></textarea>
        <br>
                
        <label for="telephone">Phone Number</label>
        <input type="text" name="phone_number" id="telephone" value="{phone_number}" maxlength="11" size="40" />
        <br>
        
        <label for="website">Web Address</label>
        <input type="text" name="website_address" id="website" value="{website_address}" maxlength="40" size="40" />
        <br>
                
        <label for="courses">Courses Offered</label>
        <select id="courses" name="courses_offered" multiple="multiple">
            {options:courses_offered}
                <option value="{option_value}"{selected}>{option_name}</option>
            {/options:courses_offered}
        </select>
        <br>        
            
        <label for="categories">Categories</label>
        <br>
        <select name="category[]" id="categories" size="4" multiple="multiple">
        {categories}
            <option value="{category_id}"{selected}>{category_name}</option>
        {/categories}
        </select>
        <br>
        
        {if member_group == "1" OR member_group == "6"}
        
        <input id="logo" name="company_logo" type="file" value="{company_logo}" />
        
        <label for="equipment">Equipment</label>
        <textarea id="equipment" name="equipment" rows="5" value="{equipment}"></textarea>
        <br>
        
        <label for="prices">Prices</label>
        <textarea id="prices" name="prices" rows="5" value="{prices}"></textarea>
        <br>
        
        <label for="description">About the School</label>
        <textarea id="description" name="description" rows="5" value="{description}"></textarea>
        <br>
        
        {/if}
        {if captcha}
            <label for="captcha">Please enter the word you see in the image below:</label
            {captcha}
    
            <input type="text" name="captcha" value="{captcha_word}" maxlength="20" />
        {/if}
        <br>
        
        <input type="submit" name="submit" value="Submit" />
    
        {/exp:safecracker}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases