Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #839673

    Hey guys
    I often create custom page builder elements to help out my clients with their content entry. I was wondering if there’s a way that I can create custom option widgets within these elements. For example I am building a component that displays product information so that a user can select one product and drop it into a page on their site to display info about that product ( using WooCommerce ). So the client needs to be able to select one product only and they have tonnes of products ( about 1000 ). I’ve created the custom element but the best option widget I can find is the select box. It’d be great if I was able to create my own, such as an auto-complete product search. To clarify, I’m talking about the “type” option when adding an element within popup_elements(). E.g. would love to be able to do this:

    
    function popup_elements(){
       $this->elements = array(
          array(
             "type" => "woocommerce_product_search",
             ... // other options here
          )
       );
    }
    
    #842171

    Hey twitchdevelopment,

    The select box, can have values.
    Those values can be populated dynamic with a Query and put inside an array.
    That is although something that would require some more advanced coding, so it is better to consider hire a freelancer to do that for you.

    Best regards,
    Basilis

    #852376

    Hey Basilis

    I understand that but I’m really asking if there is a way to create our own widgets? For example, I can populate the select box with all the products, but that makes a really long list whereas if I could either use the WooCommerce Select2 or if I could create my own ( some sort of auto-lookup or lookahead widget ) that’d be awesome.

    It’d just be great to be able to extend the widgets functionality so that we could add our own.

    Cheers

    #853652

    Hi,

    The “subtype” parameter accepts a callback or function as value. You can create a custom function that populates the “select” element. Example in the blog.php file, you can find functions such as the “AviaHtmlHelper::number_array(1,5,1))” or the “AviaHelper::get_registered_image_sizes(array(‘logo’))” which populates the select options. Please hire a freelance developer or contact our partner, Codeable for additional help.

    // http://kriesi.at/contact/customization

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.