I'm new to Zoho CRM. I need to show a warning on button press but only once for the first button press. This sounds really simple but yet I can't figure out how to do it in Zoho Creator as all variables seems to have local scope so I can't determine if the button was pressed before. I've been searching if there are global variables in Zoho but found only workarounds with creating another applications for that case.
I've also tried creating a field on my form and hiding it to pass some value there if the button was pressed so next time I can check this field but is not working for some reason.
In validation part I'm assigning new value to a field
warning_shown=true;
But on a form this checkbox remains unchecked and next time I press the button warning_shown equals false.
Any suggestions will be appreciated!
In case someone interested, here is a reply I got on another forum that might help. Here is a link for that topic
It's not going to be possible to use the validation code section to display the message.
I was thinking you could have your hidden decision box field, and in the "On User Input" of the last field in the form you could use something like:
//remember to change field names accordingly
if !input.warning_shown
{
alert "Message here!";
input.warning_shown = true;
}
This would show the message after the last field is filled but before the button is clicked.
Related
Sorry if this is a dumb question. I'm a GTM noob and from googling I see tutorials on tracking the clicks (checkbox element and Checkout button) separately but was wondering if there's any way this can be one Event in Google Analytics.
For example, on our store's cart page a checkbox to add a product's accessory is selected by default. I want to know how many people are hitting the Checkout button and leaving this "add an accessory" checkbox checked.
Is there a way to push an Event as something like "Checkout click - Add On Checkbox - Selected"?
Thanks in advance!
Yes, you can detect if a checkbox is checked on any event, using a Custom Javascript variable, value of which you then can use in the trigger, or in your tag. Or in a different variable, of course.
If you provide the html of your checkbox, we can give you code for the variable to return the checkbox state if you're not comfortable with JS.
//Upd
In your code, you have a few errors. First, no need to name the function in the CJS variable. Also, you write a bit too much code and rely on JQuery with no need. It can be solved simpler with pure JS like so:
function(){
return document.querySelector("input#add-subscription").checked;
}
Now, about the rest of what you're saying. Having this checkbox action. You have a wrong understanding. This is not a checkbox action. This code only gets the state of the checkbox whenever the value of this variable is being used.
So if you're gonna use the value of this variable when a person clicks on the form submission CTA, then this code will run on that click, assessing the value of the checkbox.
Your amazon example works. But you don't need to assume that the checkbox is checked by default. The default doesn't mean anything here. The state of the checkbox is assessed on the trigger where the value of the CJS var is used, that's it.
We're proceeding with your question: I'm confused about having the multiple criteria (checkbox is checked and user hits Checkout button) and if including both as triggers would work You're making another mistake here. They're not both triggers. One of them is a trigger indeed, which is a click trigger. The other, however, is a condition for the trigger to fire. You know how in the trigger, you click the checkbox that says "some events"? This fella:
Once you have that, you can add conditions. Like, only use this trigger when... when what? Anything really. In our case it would be when the checkbox is true.
Finally, for the checkout click, you don't typically need more than just the click trigger with the CSS selector criteria.
Anyhow, to be short, this is about how your trigger should look like:
Thanks! In this case the checkbox element for my cart page is:
<input id="add-subscription" type="checkbox" checked="checked" class="form-checkbox js-product-subscribe-newux mt-10 sm:mt-0" name="sub" value="remove">
I was thinking the variable could be:
function checked() {
var check = jQuery('form-checkbox js-product-subscribe-newux mt-10 sm:mt-0').attr("checked");
if(check === "checked") {
return true;
} else {
return false;
}
}
However where I get confused is having this checkbox action (checkbox is checked) only count as an event when the user hits the Checkout button. Using this Amazon cart page as an example, assuming the "This is a gift" checkbox is clicked by default, "This is a gift" checkbox would I just then add the Trigger as having two criteria, roughly: {{Checkbox Variable}} = "true" & Click Text = "Proceed to Checkout? I'm confused about having the multiple criteria (checkbox is checked and user hits Checkout button) and if including both as triggers would work in this case so I can see how many times users click to checkout from the cart while leaving that box checked. Or would the Click on the Checkout button need to be it's own separate variable rather than just specifying the Checkout button name in the trigger criteria?
I've been trying a messenger chatbot from a Taiwanese company, but I found it not so funny to play: Is it possible to design a button with a text on it which will trigger an automatic message with a different text from the user?
F.e. something like:
Button text: OK >>>> Text: I'm not sure I can help, but I'll do my best.
When creating a button within messenger you add a postback value which is going to be post to your webhook when someone clicks on the button. You can then test the specific value to act upon it. IF source === "MY_SPECIFIC_VALUE_BEHIND_BUTTON" THEN ...
I came across a problem with checking and unchecking the same record on form.
I have a form with list of records, depending on status on record you can see an active/inactive button. Logic for this is included in active method on data source. When i click checkbox first time for some record it is Ok, button acts as required, but when i click this same checkbox second time to uncheck this record, the button does not work ok. For example if a record is checked the button Accept is active, but if a record is unchecked the button Accept should be inactive. I tried to solve this issue also with selectionChanged method but it didn't help. Could you give me some guidance how to handle with this problem?
Below I updated my post with pictures - it is specifically about Confirm button.
Thanks for add you code.
Ok, this is the button ComplaintConfirm?? if this is the botton in one part you compare Complaints.ComplaintConfirmed == Complaints_ComplaintConfirmed.checked(false)
Complaints.ComplaintConfirmed if a enum NoYesId?? if a NoYesId perhaps here is the error.
Can you try this?
ComplaintConfirm.enabled((Complaints.ComplStatus == ComplStatus::Accepted || Complaints.ComplStatus == ComplStatus::Rejected) && Complaints.ComplaintConfirmed == NoYes::No);
i have a little problem. I'm using Oracle Applicarion Express and i'm trying to use some page items in a Link created for a button. I created the Button as region button, and selected in the region" Action when button clicked" "Redirect to URL". In this URL i want to use two pageitems. I tried already to use them mit ":PAGE_ITEM" or "&PAGE_ITEM." but non way works. Can someone help me please?
What does the resulting hyperlink look like? The chance is great that it looks like
f?p=<app_id>:10:<session id>::::P10_ITEM1,P10_ITEM2:,
This is because when using the substitution syntax like &PAGE_ITEM. will put the session state of the referenced item in the string. Since the button is rendered during the loading of the page it will use the session state of the item at that time.
When you then fill in a value for PAGE_ITEM, this will not change the session state of that item - and even if it did it would not matter since the button was already rendered.
If this is the case then you'd better have the button submit the page, and define an on submit before validations/computations branch to act on that button. In the branch you can then safely use the session state of the required items.
I have an ASPxTextBox with a NullText. It is used for a user name. Some users are copying their user name from the registration email into this text box. When they do it via right click and the context menu and go back to their email client to copy the password, the text box gets emptied, i. e. NullText is displayed.
I can reproduce this. However, when using Ctrl+V to paste the user name, it is persistent.
It seems to me that the ASPxTextBox is looking for a keydown event or something similar to decide if the text has changed.
How can I make the text persistent in all cases?
It seems that this behavior is a side effect of the browser/form AutoComplete feature.
Can you try to reproduce this issue with a regular with the placeholder attribute (HTML5)?
If the behavior is the same, see this thread.
I am working around this issue with this jquery plugin:
https://github.com/mathiasbynens/jquery-placeholder