Skip Navigation

[Resolved] Need some help in the approach with thsi project

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by Minesh 6 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#602868

We are setting up a system where a client can create an online business card or business card and splash page.

The business card side I have done and is happy with it. With the splash page, I need some guidance, please.

The splash page I want to include a few variable options. I will list what I want to do and give a bit more comprehensive information.

The variable options I want to include on the splash page is:

I want to create eg three templates(views). When the client selects a design option in the input screen views must select the view design that is appropriate. Ie there will be three images of different views of the splash page and this must then be recorded in a field in the CPT so that when anybody accesses the specific splash page the selected design will then be applied.

The next step will be when a new client select a field radio button for the header of the page ie
text header
image logo
this information will be stored and in future when the CPT is accessed the correct header will show. I am not sure how toolset will handle this. If it will an "either/or" option within a view or two views with the correct option showing on either.

#602894

Hi there

I would like to add one question to this project.

The other issue is, I created a parent and child connection because there is a need to have "custom fields" available on the parent where the custom fields could be a variety of options from one entry to unlimited options.
Ie eg social media accounts and it could be one account or 5 or 10 accounts. This I did with a parent-child setup. On the post side no problem. But on cred how do I get to show the child fields so it could be completed. I have seen a reference to " Child Post Form Link"

So I have created a parent form and a child form in cred. Now how do I go about linking the two that the child knows to which parent it belongs to once both corms have been completed?

#602904

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is no such built in feature exist but Yes, using some custom programming you can achieve this. You should have content templates as dropdown options for your available templates.

If you are using CRED form then you should build custom dropdown with your existing content template as dropdown options. You should try to add dropdown select box using CRED generic field with your content template options to your CRED form.
=> https://toolset.com/documentation/user-guides/inserting-generic-fields-into-forms/

Now, you can display different template for your post type using the view's filter hook wpv_filter_force_template :
=> https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_force_template

For example:

//Show a specific Content Template applied to a given post for not logged in visitors and in every place where this post appears:
add_filter( 'wpv_filter_force_template', 'prefix_fixed_content_for_visitors', 99, 3 );
function prefix_fixed_content_for_visitors( $template_selected, $id, $kind ) {
    if ( !is_user_logged_in() && $id == 345 ) { // if the user is not logged in and is trying to view the post with ID 345
        $template_selected = 123; // assign a fixed Content Template with ID 123 that contains a static text
    }
    return $template_selected;
}

You should adjust the the above filter code as per your requirement by checking which user selected which content template to display.

If you need custom programming with your project, Please feel free to contact our certified partners:
=> https://toolset.com/contractors/

Also, please kindly open a new ticket for your each new question. This will help other users searching on the forum.