Is it possible to allow a user to select and thereby highlight one of three order cards as part of an ordering process? (This selection would then be shown on an order confirmation window.)
It seems now that only checkboxes can talk to a database as a user input…
Any other selection method tricks? (like hidden radio buttons thereby allowing only one selection (checkmarks=multiple))
You can do this with code. You’ll need to use the onClick event handler of the images to capture which image was clicked last (you probably also want to give some sort of visual indication of this for your users, possibly by showing/hiding shapes that are placed behind the images). Then you can use the wix-dataset or wix-data API to “connect” that information to your collection.
Thanks Sam. I’ll test this and reply with how it went.
Not to necro but I have had terrible luck finding a Wix Pro who can implement this for me.
Can I hire you to log into my editor and do it? :*)
" I have had terrible luck finding a Wix Pro "
" You can hire an expert in Wix Arena .
Good luck :)"
Let’s try this-
I have my highlighted border image (container11) hidden on load, open its properties, and open the event handler for onMouseIn - what is the function code to show or unhide it?
Hello? @Sam @Or @anyone
I tried to break this down to where I believe I need a type of code to process this function… let me know if I’m missing something?
Was anyone able to accomplish this?
Hi Camille,
My suggestion is to place a box above the image, add a checkbox element add an onClick event to the box.
export function box1_click(event) {
if ($w('#box1').style.borderWidth === '1px') { // which means it's unselected
$w('#checkbox1').checked = true; // or $w('#dataset1').setFieldValue('youSelection', true);
$w('#box1').style.borderWidth = '10px';
}
else {
$w('#checkbox1').checked = false;
$w('#box1').style.borderWidth = '1px';
}
}
Do you understand the general idea?
Roi.
@roi-bendet Are you saying to overlap a checkbox element on top of the image I want selectable?
I understand vector images can process events OnClick, can’t I have that click make an entry in my database (that I can then translate into ordering info for the selected card)?
I am having this same issue. I have images on a product page. When user clicks that image, I want it to appear in another page. The image is currently linked to that other page but does not appear, rather it just links the image upon click to another page.
Would it have to be done this way or is there another way? Thanks