nickT-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 |
---|---|---|---|---|---|
Page/Post level controls for Access
Started by: nickT-2 in: Toolset Professional Support |
2 | 4 | 5 years ago | ||
Restrict access to WooCommerce products based on User Type
Started by: nickT-2 in: Toolset Professional Support |
2 | 2 | 5 years, 4 months ago | ||
Saving another field in the Types checkboxes field format
Started by: nickT-2
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
2 | 7 | 5 years, 12 months ago | ||
How to remove default sidebar which is showup
Started by: nickT-2
in: Toolset Professional Support
Problem: The issue here is that the user has his CPT but his theme is rendering the sidebar on his CPT. Solution: If your theme does not support this then I would recommend copying your single.php file and rename it to single-{cpt_slug}.php in order to allow that file to be used for your cpt and then remove the sidebar(); function from the code. |
2 | 5 | 6 years ago | ||
Adding Checkbox Options to my Quote builder – FYA Christian
Started by: nickT-2
in: Toolset Professional Support
Problem: I would like to add several values in a cred_save_data hook and store the total in a custom field. The values are actually stored in another post, and the custom fields and generic fields in the CRED form should be used to determine which fields should be included in the sum. Solution: Set the checkbox default values to "1", and use conditionals to determine whether or not to add the custom field values based on those checkboxes. add_action('cred_save_data', 'my_save_data_action',10,2); function my_save_data_action($post_id, $form_data) { $forms = array( 6831 ); if ( in_array( $form_data['id'], $forms ) ) { // get the values from package custom fields and push into enquiry custom fields $package_id = $_POST['package']; $selected_flight = $_POST['flights']; $flight_price = get_post_meta( $package_id, 'wpcf-flights-price-' . $selected_flight, true); $selected_hotel = $_POST['hotels']; $hotel_price = get_post_meta( $package_id, 'wpcf-hotels-price-' . $selected_hotel, true); $selected_car = $_POST['car']; $car_price = get_post_meta( $package_id, 'wpcf-car-price-' . $selected_car, true); $selected_excursion1 = $_POST['excursion1']; $excursion1_price = $selected_excursion1 ? get_post_meta( $package_id, 'wpcf-excursion-option-1-price', true) : 0; $selected_excursion2 = $_POST['excursion2']; $excursion2_price = $selected_excursion2 ? get_post_meta( $package_id, 'wpcf-excursion-option-2-price', true) : 0; $selected_excursion3 = $_POST['excursion3']; $excursion3_price = $selected_excursion3 ? get_post_meta( $package_id, 'wpcf-excursion-option-3-price', true) : 0; // calculate the total $total = $flight_price + $hotel_price + $car_price + $excursion1_price + $excursion2_price + $excursion3_price; // push total figure to custom field 'Total Quote' update_post_meta( $post_id, 'wpcf-total-quote', $total ); } Relevant Documentation: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data |
2 | 5 | 6 years ago | ||
CRED Form – using View to display option content
1
2
Started by: nickT-2
in: Toolset Professional Support
Problem: You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 21 | 6 years ago | ||
Use images in CRED select field and enable click to select option
Started by: nickT-2
in: Toolset Professional Support
Problem: I would like to show images for each option in a CRED form input field, and allow Users to click an image to select an option. Solution: It is possible to insert an HTML image tag in the label of a radio field. Additional customization requires custom CSS and possibly JavaScript. [cred_generic_field field='priceselect' type='radio' class='' urlparam=''] { "required":0, "validate_format":0, "default":[], "options":[ {"value":"london","label":"<img src='http://yoursite.com/wp-content/uploads/2018/03/london.jpg' />"}, {"value":"manchester","label":"<img src='http://yoursite.com/wp-content/uploads/2018/03/manchester.jpg' />"}, {"value":"midlands","label":"<img src='http://yoursite.com/wp-content/uploads/2018/03/midlands.jpg' />"}, {"value":"scotland","label":"<img src='http://yoursite.com/wp-content/uploads/2018/03/scotland.jpg' />"} ] } [/cred_generic_field] |
2 | 14 | 6 years, 1 month ago | ||
Building an online pricing tool & enquiry taker
1
2
3
Started by: nickT-2
in: Toolset Professional Support
Problem: I would like to build an online pricing tool that can be used to submit enquiries. The values in the pricing tool should be defined using custom fields on the parent post. Solution: Use CRED generic fields to allow the User to select options, then use the CRED API hook cred_save_data to perform the necessary calculations. If more than one option in a single generic field can contain the same value, then you must use an abstraction so that each option has a different value in the form. Then convert that abstraction in the PHP code. Relevant Documentation: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data |
2 | 35 | 6 years, 1 month ago | ||
Set field value as a combination of 3 other fields
Started by: nickT-2
in: Toolset Professional Support
Problem: Solution: you should add "cred_save_data" hook to your current theme's functions.php file. You can find proposed solution with the following reply: Relevant Documentation: |
2 | 5 | 6 years, 1 month ago | ||
Creating a grid of users
Started by: nickT-2 in: Toolset Professional Support |
2 | 4 | 6 years, 2 months ago | ||
How can we change the Clear date icon on the Date Picker Field
Started by: nickT-2
in: Toolset Professional Support
Problem: function toolsetcustomization_changeDatepickerDeleteIcon(){ $calendar_delete_image = 'http://thegilpinv2.staging.wpengine.com/wp-content/uploads/edit.png'; // replace with your icon URL. return $calendar_delete_image; } add_filter('wptoolset_filter_wptoolset_delete_date_image', 'toolsetcustomization_changeDatepickerDeleteIcon'); Relevant Documentation: |
2 | 7 | 6 years, 2 months ago | ||
Date Field is no longer passing data to the url
Started by: nickT-2
in: Toolset Professional Support
Problem: The original ticket with Luo Yang code is here - https://toolset.com/forums/topic/creating-a-check-availability-widget-and-pass-on-date-text-data/ I'm wondering if a recent plugin update has changed the way this works? This is the link generated by the form when it worked: And now: I'm wondering where this 'NaN-NaN-NaN' is coming from? Solution: This is a custom JS codes problem, and there isn't such a built-in feature within Views plugin, you will need to customize those JS codes according to your own website settings, and you are right, it might be a problem of plugin update. Here is the an example, edit the view “Check Availability - sticky”: To: 2) and add another hidden field with HTML codes: 3) Change the JS codes to: jQuery(document).ready(function($){ $('form[data-viewid="126"]').attr('action', ' https://gc.synxis.com/rez.aspx'); //submit to another URL $('form[data-viewid="126"]').attr('target', ' _blank'); //submit to another URL $('input[name="arrive-date-picker"]').change(function(event){ var v = $(this).val(); var d = new Date(v * 1000); var new_v = format_date_1(d); console.log(new_v); $('input[name="arrive"]').val(new_v); //$(this).val(encodeURIComponent(v)); }); }); /* Toolset code - change date format */ function format_date_1(date) { month=date.getMonth(); month=month+1; //javascript date goes from 0 to 11 if (month<10) month="0"+month; //adding the prefix year=date.getFullYear(); day=date.getDate(); return day+"/"+month+"/"+year; //return encodeURIComponent(day+'/'+month+'/'+year); } Relevant Documentation: |
2 | 4 | 6 years, 3 months ago | ||
URL Encoded Value instead of a backslash
Started by: nickT-2 in: Toolset Professional Support |
3 | 8 | 6 years, 7 months ago | ||
Creating a Check Availability widget and pass on date & text data
Started by: nickT-2 in: Toolset Professional Support |
2 | 14 | 6 years, 7 months ago | ||
How do I change the date picker icon
Started by: nickT-2
in: Toolset Professional Support
Problem: Solution: - You can follow these docs (Date section): |
2 | 3 | 6 years, 7 months ago |