Skip to main content

Can anyone tell me how to hide “place request” button on a service item based on the answer to a question the customer gives on a drop down.

Basically I want to ask the customer to make sure they have done something before they can continue with the request so I want to hide the place request button until unless they select the yes option in the drop down. 

thanks

Hello @Lal23, might I suggest a different approach, you could make the field a checkbox and set it required. Then the user would need to check the box to satisfy your request before clicking place request.

Hope that helps.


Hello @Lal23, might I suggest a different approach, you could make the field a checkbox and set it required. Then the user would need to check the box to satisfy your request before clicking place request.

Hope that helps.

Thanks for your suggestions but the customer has to go away and perform some tasks before they can continue - we have a check box after they done what they need to do.  We have managed to hide the “place request” button on another service item but I cant figure out where this is done now.  It was done as part of our support during implementation.


To hide the "Place Request" button on a service item, you'll typically need to access the code or settings of your website or e-commerce platform. The exact method may vary depending on the platform you are using. Here are a couple of general approaches you can try:

  1. CSS Styling:

    • Inspect the element: Right-click on the "Place Request" button and select "Inspect" (or similar) from the browser's context menu. This will open the browser's developer tools and highlight the corresponding code.
    • Identify the button's HTML element: In the developer tools, locate the HTML element that represents the "Place Request" button. It may have a specific class or ID assigned to it.
    • Add a CSS rule to hide the button: Once you have identified the HTML element, you can add a CSS rule to hide it. For example, you can use the display: none; property to hide the button. Add this rule to your website's CSS file or in the appropriate section of your platform's theme customization options.
    • Save the changes: After adding the CSS rule, save the changes and refresh the page to see if the "Place Request" button is now hidden.
  2. Platform-specific settings:

    • Check the platform's settings: Some e-commerce platforms offer specific settings or options to hide certain elements on product/service pages. Check the platform's documentation or settings menu to see if there is an option to hide the "Place Request" button.
    • Disable or customize the button: If there is no direct option to hide the button, look for settings that allow you to disable or customize the button's visibility. You may be able to remove it by modifying the product/service settings or by using custom fields.

Remember to always test the changes on a staging or development environment before implementing them on your live website. Additionally, if you're not familiar with coding or customization, it's recommended to consult with a developer or support team specific to your platform for assistance.


To hide the "Place Request" button on a service item, you'll typically need to access the code or settings of your website or e-commerce platform. The exact method may vary depending on the platform you are using. Here are a couple of general approaches you can try:

  1. CSS Styling:

    • Inspect the element: Right-click on the "Place Request" button and select "Inspect" (or similar) from the browser's context menu. This will open the browser's developer tools and highlight the corresponding code.
    • Identify the button's HTML element: In the developer tools, locate the HTML element that represents the "Place Request" button. It may have a specific class or ID assigned to it.
    • Add a CSS rule to hide the button: Once you have identified the HTML element, you can add a CSS rule to hide it. For example, you can use the display: none; property to hide the button. Add this rule to your website's CSS file or in the appropriate section of your platform's theme customization options.
    • Save the changes: After adding the CSS rule, save the changes and refresh the page to see if the "Place Request" button is now hidden.
  2. Platform-specific settings:

    • Check the platform's settings: Some e-commerce platforms offer specific settings or options to hide certain elements on product/service pages. Check the platform's documentation or settings menu to see if there is an option to hide the "Place Request" button.
    • Disable or customize the button: If there is no direct option to hide the button, look for settings that allow you to disable or customize the button's visibility. You may be able to remove it by modifying the product/service settings or by using custom fields.

Remember to always test the changes on a staging or development environment before implementing them on your live website. Additionally, if you're not familiar with coding or customization, it's recommended to consult with a developer or support team ahsaasprogram specific to your platform for assistance.

 


To hide the "Place Request" button on a service item, you'll typically need to modify the HTML or CSS code of the webpage where the button is displayed. The specific steps can vary depending on the platform or framework you're using, but here's a general approach:

Identify the HTML element or class associated with the "Place Request" button. You can use your browser's developer tools (Inspect Element) to find the relevant code. Look for an element or class name that uniquely identifies the button.

Once you've located the element or class, you can use CSS to hide it.

Add an inline style directly to the HTML element: You can add the style attribute to the HTML element and set its display property to none. For example:

html
Copy code
Place Request
Use an external CSS file: If you have a separate CSS file linked to your webpage, you can target the element or class and set its display property to none. For example:

css
Copy code
.place-request-button {
  display: none;
}
 If you've correctly identified the element or class and applied the appropriate CSS, the button should no longer be visible.

Keep in mind that modifying the code of a webpage may require appropriate permissions or access to the underlying codebase. If you're working with a platform or framework that provides customization options, consult its documentation for guidance on how to hide or remove specific elements.


Hi @Lal23 

We use Business Rules to do this kind of thing by using “validate form on submission”...so if the customer chooses certain items from a drop-down then it prevents them from submitting the request and displays a customisable ‘error’ message, and only lets them submit the form if they choose the ‘correct’ answer.

 

 


Hi @Lal23 

We use Business Rules to do this kind of thing by using “validate form on submission”...so if the customer chooses certain items from a drop-down then it prevents them from submitting the request and displays a customisable ‘error’ message, and only lets them submit the form if they choose the ‘correct’ answer.

 

 

Thanks very much I have tested this and it works - I would prefer to remove the place request button completely but at least it wont let them submit this type of request! appreciate the response! 


@Lal23 You can use a script and place it in the Footer of the portal.

The script below will run only on service item nr 45.

This service item has a dropdown menu with two values (“Read access” and “Write access”). When the “Read access” is selected, the “Place request” button will disappear.

ID “45_d5206d17-dcb2-4536-9147-3f6edaa8e05f” from the dropdown field has to be be changed in the script as well as the dropdown value in the row from “var hide_entry = ‘Read access’; “.

 

<script>
$('.btn.btn-primary.place-request-btn').show();
jQuery(document).on('PageUpdate', function() {
setTimeout(function() {
var current_loc = window.location.pathname;
  var required_loc = "/support/catalog/items/45";
  if (current_loc == required_loc) {
      console.log(current_loc);
    
    $("#45_d5206d17-dcb2-4536-9147-3f6edaa8e05f").change(function () {
        console.log($(this).val());
          var hide_entry = 'Read access';
           if(hide_entry === $(this).val()) {
              $('.btn.btn-primary.place-request-btn').hide();     
             console.log($(this).val());
             
           } else {
             $('.btn.btn-primary.place-request-btn').show();  
             console.log($(this).val()); 
           }
    });
  }
  }, 500);
});  
</script>

 

Kind regards,

 

Rutger Bockholts

Freshworks


Thanks for your suggestions but the customer has to go away and perform some tasks before they can continue - we have a check box after they done what they need to do.  We have managed to hide the “place request” button on another service item but I cant figure out where this is done now.  It was done as part of our support during implementation this ehsasprogram


@bettygdurand , in the CSS /custom stylesheet code the button can be made hidden in permanently. In a script, like the one I share earlier, we can set conditions, like to hide the button in certain service items. I'm personally not aware of code that can be used in the CSS to hide the button dynamically.

If you still have access to the customer instance, I'd suggest you to search in the different portal pages for “btn.btn-primary.place-request-btn”, which can hide that Place request button. In this case you hopefully can find the code that you need.

 

Regards,

Rutger


To hide the "Place Request" button on a service item, you'll typically need to access the code or settings of your website or e-commerce platform. The exact method may vary depending on the platform you are using. Here are a couple of general approaches you can try:

  1. CSS Styling:

    • Inspect the element: Right-click on the "Place Request" button and select "Inspect" (or similar) from the browser's context menu. This will open the browser's developer tools and highlight the corresponding code.
    • Identify the button's HTML element: In the developer tools, locate the HTML element that represents the "Place Request" button. It may have a specific class or ID assigned to it.
    • Add a CSS rule to hide the button: Once you have identified the HTML element, you can add a CSS rule to hide it. For example, you can use the display: none; property to hide the button. Add this rule to your website's CSS file or in the appropriate section of your platform's theme customization options.
    • Save the changes: After adding the CSS rule, save the changes and refresh the page to see if the "Place Request" button is now hidden.
  2. Platform-specific settings:

    • Check the platform's settings: Some e-commerce platforms offer specific settings or options to hide certain elements on product/service pages. Check the platform's documentation or settings menu to see if there is an option to hide the "Place Request" button.
    • Disable or customize the button: If there is no direct option to hide the button, look for settings that allow you to disable or customize the button's visibility. You may be able to remove it by modifying the product/service settings or by using custom fields.

Remember to always test the changes on a staging or development environment before implementing them on your live website. Additionally, if you're not familiar with coding or customization, it's recommended to consult with a developer or support team ehsaasprograam specific to your platform for assistance.

 

I am using shopify but I can’t find any disable button or any other disabling setting for this. Can you elaborate more?

 


Reply