simranjeetS-2
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Need help in views shortcode
Started by: simranjeetS-2
in: Toolset Professional Support
Problem: I am trying to: have number of child posts in my search page. Search page shows number of parent posts. I am using this shortcode to display a view [wpv-view name="number-of-reviews"] with filter: Select posts that are children of the Post where this View is shown This works in single parent post but does not show number of reviews in search page. Solution: You can change the filter to: Select posts that are a children of the current post in the loop. That will be able to work in both cases: 1) single "lawyer" post 2) Loop of "lawyer" posts in view "Arch-View" Relevant Documentation: https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/ |
2 | 3 | 6 years, 8 months ago | ||
Cred form submitted child post shows in 2 lines unexpectedly – see pic
Started by: simranjeetS-2
in: Toolset Professional Support
Problem: Display child posts submitted through cred form. One label in one line. But only name label and output shows correctly. Other labels and outputs are shown in new lines. Details and output should be one line. review and output should be in another line. I expected to see: Each line having a label and output. Solution: Types shortcode for custom textarea field will output the field value wrapped in a HTML .. tag, you can disable it by adding attribute output="raw" in the Types shortcode, for example: Relevant Documentation: https://toolset.com/documentation/customizing-sites-using-php/functions/#textarea |
2 | 3 | 6 years, 8 months ago | ||
Using CRED for WordPress comments – How to make form work
Started by: simranjeetS-2
in: Toolset Professional Support
Problem: I would like to use CRED to create comment posts, and I would like those comments to be children of the current Lawyer CPT. Solution: Create a new CRED form that creates CRED Comment posts. Auto-generate the form markup, and wrap the parent select field in a hidden div. Define the value of the parent select field using the ID of the current post: <div style="display:none"> [cred_field field='_wpcf_belongs_lawyer_id' value='[wpv-post-id id="$current_page"]' select_text='--- not set ---' class='form-control' output='bootstrap'] </div> Relevant Documentation: https://toolset.com/documentation/user-guides/cred-forms-for-child-content/ |
3 | 7 | 6 years, 8 months ago | ||
Post type does not appear in admin menu
Started by: simranjeetS-2
in: Toolset Professional Support
Problem: My custom post type does not appear in the admin menu. Solution: In the Post Type Editor, find the Options panel and ensure "show_ui" and "show_in_menu" are checked. |
2 | 3 | 6 years, 8 months ago | ||
layouts sidebar is displaying above enfold theme sidebar
Started by: simranjeetS-2
in: Toolset Professional Support
Problem: The issue that here is that the user was using the Enfold theme but created a custom layout for his CPT. He added a custom Sidebar using Layouts but when previewing on the frontend the default theme's sidebar is overlaid her as well. Solution: The solution to this would be to disable the sidebar by going to your enfold theme options. |
2 | 7 | 6 years, 8 months ago | ||
Enfold theme sidebar probem
Started by: simranjeetS-2
in: Toolset Professional Support
Problem: The issue here is that the user had created some rows and columns using our Layouts plugin but on the frontend the Rows and columns are not showing up. Solution: Our Layouts plugin uses the bootstrap class elements in order to do the columns and rows. If bootstrap is not loaded on the side then these items won't display correctly. Our Toolset plugins include bootstrap but you will need to enable it by going to Toolset -> Settings -> Bootstrap Loading. |
2 | 9 | 6 years, 8 months ago | ||
how to have a checkbox before submit button for accepting terms and conditions
Started by: simranjeetS-2 in: Types Community Support |
2 | 3 | 6 years, 8 months ago | ||
Using default image if user submits form without image
Started by: simranjeetS-2
in: Toolset Professional Support
ProblemHow can I validate a field in a Toolset Form, so that when for example the user would have to submit an image but doesn't, it automatically adds a "dummy" image to that field? How can I do that? SolutionYou could simply add a default value to the Custom Field, so if it’s not edited, that value is used. But that may look not so smooth, hence a „in the background“ action is required. Since this is not really a validation where we throw an error but just ensuring that the field is somehow populated, we can apply a CRED cred_save_data() action. This hook allows you to fire any PHP at the moment when the post is saved to the database. The hooks allow you to perform your custom code a the right moment, that is all that our API does, along with providing several data sets in those hooks so you can use it in the code. Let me give a simple example. add_action('cred_save_data', 'my_save_data_action',10,2); function my_save_data_action($post_id, $form_data) { // if a specific form if ($form_data['id']==12) { if (!isset($_POST['my_custom_field']))//Change "my_custom_field" to your wpcf-field { // since $_POST['my_custom_field'] is not set (!isset()) update_post_meta($post_id, 'my_custom_field', 'whatever-value-you-like-or-url-to-image'); } } } Above PHP code checks if the $_POST input (my image field) is set, and if not, it adds a value. |
2 | 3 | 6 years, 8 months ago | ||
Show default value for Fields
Started by: simranjeetS-2
in: Toolset Professional Support
Problem I want to show default values for my fields, in case the field is not edited when saving the post (is empty). SolutionThere are 2 possible ways to achieve this, one while adding the value of the Field, the other when displaying the field on the front end. 1. While adding the field value (edit the field on the front end thru a CRED form) - create the custom fields and include them in the CRED Form ==> Since you had set a default value, the field will always show that default value if not changed Or, you can skip the above steps and update the Custom Field (if empty) with a custom hook to update_post_meta() with your default value, using the cred_save_data() filter 2. When outputting the field value on a post - create the custom fields and include them in the CRED Form In the conditional, check if the field is empty to display your custom default text, or if it's not empty you can display the value of the field. |
2 | 5 | 6 years, 9 months ago | ||
in cred form I want photos to be accepted only if they are of a particular size.
Started by: simranjeetS-2 in: Types Community Support |
2 | 12 | 6 years, 9 months ago | ||
Allow specific HTML tags in CRED forms
Started by: simranjeetS-2
in: Toolset Professional Support
ProblemHow can we control what HTML tags are allowed to be submitted with CRED Forms? SolutionAll HTML tags that you check in Toolset > Settings > Forms > Content Filter, will be allowed, all that are unchecked will be stripped, when the form is submitted. There will be no error message to the user. Relevant Documentationhttps://toolset.com/documentation/user-guides/content-filter-settings/ |
2 | 4 | 6 years, 9 months ago | ||
PHP Custom Code for Toolset Custom Fields
Started by: simranjeetS-2
in: Toolset Professional Support
ProblemI want to write a PHP Code that does some things with the Toolset Custom Fields. Mainly, it should display the things conditionally, for example, if the field is not empty, it should display something, otherwise not. Can you help me? Solution The Toolset is crafted with this one purpose in mind: Everything in the described goal can be achieved using only the Toolset GUI and no PHP. However, for PHP solutions there is a good „mini-tutorial“ linked below. |
2 | 5 | 6 years, 9 months ago | ||
Creating review system with toolset
Started by: simranjeetS-2 in: Toolset Professional Support |
2 | 3 | 6 years, 9 months ago | ||
Repeating Fields with Custom HTML for each item, like icons or list
Started by: simranjeetS-2
in: Toolset Professional Support
ProblemI have a Repeating Custom Field and want to output it as a list (each of its items should be a list item) or I want to add an Icon on the front of each. How can I do that? SolutionTo create a list or other HTML structures with Repeating Fields we suggest using the Separator and the Loop intelligently to combine HTML and opening/closing tags in the Field's separator. The logic is this: - get the final HTML you want - make sure you open the HTML before the actual field renders - as separator use firstly the closing tags, then, reopen the tags for the next item - make sure the Loop closes with a Closing set of tags. Example: <ul><li>[types field='toolset-line' separator='</li><li>' ][/types]</li></ul> Note that you need to add NOT encoded characters (hence, natural HTML) to the GUI’s separator input field, it will then automatically convert to encoded characters when you insert the ShortCode! The same logical approach can be taken with other HTML or even FontAwesome Items. Note that this is limited, do not expect to have too much control over the resulting HTML. |
2 | 7 | 6 years, 9 months ago | ||
sidebar getting mixed in content when layout has sidebar and view in a row
Started by: simranjeetS-2 in: Types Community Support |
2 | 7 | 6 years, 9 months ago |