Combobox Condition

Issues related to forms.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Sun Sep 30, 2018 12:11 pm Did you set the onclick event to Show?
See my test project.
I did. strangely it doesn't work
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

Does it work as a standard form instead of a layout grid form?
If so then I have no idea what the problem is.
Have you double checked all the id names in the events etc.?
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

I've just tested it with a Layout Grid form and it seems to work.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Sun Sep 30, 2018 1:14 pm I've just tested it with a Layout Grid form and it seems to work.
Have you have any problem the radio button not showing selected after you selected one of them?
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

I guess you've seen Pablo's reply here:
viewtopic.php?f=5&t=82640&sid=78c960302 ... e9d75bf6ba

FWIW: I've updated my test project to reflect this.
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

New update WWB 14.2 released:
"It is now possible to use multiple (form) conditions with the same value for "equal to (choice)/not equal to (choice)", so you can trigger different actions for the same value."
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Tue Oct 02, 2018 10:20 am New update WWB 14.2 released:
"It is now possible to use multiple (form) conditions with the same value for "equal to (choice)/not equal to (choice)", so you can trigger different actions for the same value."
thanks
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Tue Oct 02, 2018 10:20 am New update WWB 14.2 released:
"It is now possible to use multiple (form) conditions with the same value for "equal to (choice)/not equal to (choice)", so you can trigger different actions for the same value."
Anyway, I have finished my form as below

http://www.goec.com.au/goec2/camprego2019.php
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

Looks good, well done.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Wed Oct 10, 2018 10:16 am Looks good, well done.
thanks. however, my autoresponder just stopped working for some reason. very strange.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

hey wwbman,

any idea how to resolve the following issue of mine.

as you are aware my form has selection from 1 to 10. In my autoresponder I also have 1 to 10. However, if the user only select 3, how can I create the autoresponder in such a way that the it will only send 3 to the user who registered? thanks.
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

Isn't this the same issue I mentioned in a previous post?
"It's just occurred to me that when you click e.g. 2 after clicking 3 (and filling in 3) then although the editbox will be hidden the entry for 3 will still be sent in the email so I've added a bit of Javascript (in Page HTML) to clear the relevant boxes.
So I would download the project again to get the improved version
."

I noticed that events with more than one call to a javascript each containing return true; only performs the first one.
So in this case there should be only one javascript in each event which clears all the relevant boxes.
This is done in the test project.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Fri Oct 12, 2018 8:05 am Isn't this the same issue I mentioned in a previous post?
"It's just occurred to me that when you click e.g. 2 after clicking 3 (and filling in 3) then although the editbox will be hidden the entry for 3 will still be sent in the email so I've added a bit of Javascript (in Page HTML) to clear the relevant boxes.
So I would download the project again to get the improved version
."

I noticed that events with more than one call to a javascript each containing return true; only performs the first one.
So in this case there should be only one javascript in each event which clears all the relevant boxes.
This is done in the test project.
Thanks wwbman This is not my question. Your javascript works for me and it works perfect. Can you try filling up my form and just select either 1 or 2. When you submit and you received a confirmation then you will understand better my question. Thanks.

http://www.goec.com.au/goec2/camprego2019.php
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

Ah, you mean the list of IDs not just the contents.
You will need the following:
document.getElementById('indexEditbox1').disabled = true;
But then there's the problem if the user changes their mind - so you'll have to enable them when they click another button!
e.g. document.getElementById('indexEditbox1').disabled = false;

BTW, it wouldn't allow me to enter a valid postcode but it allowed 11111
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Fri Oct 12, 2018 10:56 am Ah, you mean the list of IDs not just the contents.
You will need the following:
document.getElementById('indexEditbox1').disabled = true;
But then there's the problem if the user changes their mind - so you'll have to enable them when they click another button!
e.g. document.getElementById('indexEditbox1').disabled = false;

BTW, it wouldn't allow me to enter a valid postcode but it allowed 11111
Thanks. By using the script you suggested will the irrelevant IDs which are not in use will not display in the email send to the user?

When you try to enter postcode, what are you trying to enter? Special characters? Because I set the field to only numbers. Thanks wwbman.
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

Correct, disabling will be the same as if the editboxes weren't there in the first place, so won't be included in the email or autoresponder.
Make sure you account for every case.
E.g. if the user fills in 4, then changes their mind and clicks 2, you have to disable 3 and 4.
Then of course if the user clicks 4 again you will have to enable 3 and 4. You see what I mean.
Etc, etc.

DOH!, I've just realised it's in Australia? By using Postcode I assumed it was in the UK so used the UK format.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Fri Oct 12, 2018 9:35 pm Correct, disabling will be the same as if the editboxes weren't there in the first place, so won't be included in the email or autoresponder.
Make sure you account for every case.
E.g. if the user fills in 4, then changes their mind and clicks 2, you have to disable 3 and 4.
Then of course if the user clicks 4 again you will have to enable 3 and 4. You see what I mean.
Etc, etc.

DOH!, I've just realised it's in Australia? By using Postcode I assumed it was in the UK so used the UK format.
Thanks wwbman. When disabling will the title of the fields still be there like the following? My main aim if the user only select 1, the non of the other details like below should display in their email at all. I am using HTML format in my autoresponder. Thanks wwbman

Name 2:
DOB 2: DD - MM - YYYY
Age 2:
Age Group 2: Select Camper 2 Age Group
Fees 2:
Allergies and Medical Conditions 2:
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

That’s right. None of the details will show.
If you want to try it just download my test project.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Fri Oct 12, 2018 10:56 pm That’s right. None of the details will show.
If you want to try it just download my test project.
Thanks wwbman.
You mean even the title like below all will not show as well in the email they received? What is the link to your test project?

Name 2
DOB2
Age 2
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

The titles will only show for the campers that are filled in.

The link is the same as before: http://www.mediafire.com/file/as7v9n29p ... s.wbs/file
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Sat Oct 13, 2018 8:02 am The titles will only show for the campers that are filled in.

The link is the same as before: http://www.mediafire.com/file/as7v9n29p ... s.wbs/file
I inserted the function you mentioned as below for Camper2Name
function clearbox2()
{
document.getElementById('Fee2').value = "";
document.getElementById('Camper2Group').value = "";
document.getElementById('Camper2Age').value = "";
document.getElementById('Camper2conditions').value = "";
document.getElementById('Camper2Name').disabled = true;
Camper2Group.selectedIndex = 0;
Camper2DOBYear.selectedIndex = 0;
Camper2DOBMonth.selectedIndex = 0;
Camper2DOBDate.selectedIndex = 0;
}

The result i got in the email is as below. Any idea what have I done wrong>:(

Name 2: $Camper2Name
DOB 2: DD - MM - YYYY
Age 2:
Age Group 2: Select Camper 2 Age Group
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

You'll need to disable all elements in the group.
Have you looked at my test project?
I have tested it and it works.

BTW, you don't need the selectedIndex = 0; option, that was for a Combobox.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Sat Oct 13, 2018 10:26 am You'll need to disable all elements in the group.
Have you looked at my test project?
I have tested it and it works.

BTW, you don't need the selectedIndex = 0; option, that was for a Combobox.
Thanks Wwbman.

The following is what the message I have in my autoresponder. I have 10 campers details in this message. As you can see I have say 2 campers details below as an example. If you register only for 1 camper, you will still receive all the following format, but only with camper 1 details. What I want to achieve is if the user only register for 1 camper, then the camper 2 should not be included in the autoresponder message. I looked through your test project and it doesn't seems like what I am looking for. Hope you understand what I wanted to achieve and you may possibly have the solution for me? Thanks again WWBman

Hi $ContactName.

Thank you for registering the 2019 English Church Family Camp

Your reference number is: $reference

You have submitted below information:

Total Number of Campers in this registration you have submitted is: $HowManyCampers

Camper Details
Name 1: $Camper1Name
DOB 1: $Camper1DOBDate - $Camper1DOBMonth - $Camper1DOBYear
Age 1: $Camper1Age
Age Group 1: $Camper1Group
Fees 1: $Fee1
Allergies and Medical Conditions 1: $Camper1conditions


Name 2: $Camper2Name
DOB 2: $Camper2DOBDate - $Camper2DOBMonth - $Camper2DOBYear
Age 2: $Camper2Age
Age Group 2: $Camper2Group
Fees 2: $Fee2
Allergies and Medical Conditions 2: $Camper2conditions
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

I know exactly what you want, my test project does that.
Have you downloaded the project?
You can just preview it and you'll see that e.g. if you select just one item then the details for just that one item will be sent, nothing else.
The details sent include the titles + entered data.

Please compare the events and javascript with what you have, especially the clear..() routines.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Sun Oct 14, 2018 7:40 am I know exactly what you want, my test project does that.
Have you downloaded the project?
You can just preview it and you'll see that e.g. if you select just one item then the details for just that one item will be sent, nothing else.
The details sent include the titles + entered data.

Please compare the events and javascript with what you have, especially the clear..() routines.
Thanks WWBMan. Just want to clarify. I don't want anything at all that are not selected by the user to appear in the email. For example. If the user select only 1, i don't want any of the following info related to the 2 to appear in the email at all. Because I am using HTML as email format, I just can't find a way not to have the following information sent to the user even though they only selected 1.

Name 2:
DOB 2:
Age 2:
Age Group 2: Select Camper 2 Age Group
Fees 2:
Allergies and Medical Conditions 2:

As mentioned early, presently I configure my autoresponder as
Reference number: $reference

Number of Campers: $HowManyCampers

Camper Details
Name 1: $Camper1Name
DOB 1: $Camper1DOBDate - $Camper1DOBMonth - $Camper1DOBYear
Age 1: $Camper1Age
Age Group 1: $Camper1Group
Fees 1: $Fee1
Allergies and Medical Conditions 1: $Camper1conditions


Name 2: $Camper2Name
DOB 2: $Camper2DOBDate - $Camper2DOBMonth - $Camper2DOBYear
Age 2: $Camper2Age
Age Group 2: $Camper2Group
Fees 2: $Fee2
Allergies and Medical Conditions 2: $Camper2conditions
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

petejos wrote: Sun Oct 14, 2018 8:00 am
WWBman wrote: Sun Oct 14, 2018 7:40 am I know exactly what you want, my test project does that.
Have you downloaded the project?
You can just preview it and you'll see that e.g. if you select just one item then the details for just that one item will be sent, nothing else.
The details sent include the titles + entered data.

Please compare the events and javascript with what you have, especially the clear..() routines.
Thanks WWBMan. Just want to clarify. I don't want anything at all that are not selected by the user to appear in the email. For example. If the user select only 1, i don't want any of the following info related to the 2 to appear in the email at all. Because I am using HTML as email format, I just can't find a way not to have the following information sent to the user even though they only selected 1.

Name 2:
DOB 2:
Age 2:
Age Group 2: Select Camper 2 Age Group
Fees 2:
Allergies and Medical Conditions 2:

As mentioned early, presently I configure my autoresponder as
Reference number: $reference

Number of Campers: $HowManyCampers

Camper Details
Name 1: $Camper1Name
DOB 1: $Camper1DOBDate - $Camper1DOBMonth - $Camper1DOBYear
Age 1: $Camper1Age
Age Group 1: $Camper1Group
Fees 1: $Fee1
Allergies and Medical Conditions 1: $Camper1conditions


Name 2: $Camper2Name
DOB 2: $Camper2DOBDate - $Camper2DOBMonth - $Camper2DOBYear
Age 2: $Camper2Age
Age Group 2: $Camper2Group
Fees 2: $Fee2
Allergies and Medical Conditions 2: $Camper2conditions
I just don't want the title unrelated to the user selection to appear at all.
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

I just don't want the title unrelated to the user selection to appear at all.
And that is what the test project does.
Please test it.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Sun Oct 14, 2018 8:22 am
I just don't want the title unrelated to the user selection to appear at all.
And that is what the test project does.
Please test it.
Thanks WWBman. I tested and it doesn't work the way I wanted. check out below

http://www.goec.com.au/goec2/page4.php
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

You haven't redownloaded the project.
That one is a very old version.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Sun Oct 14, 2018 10:51 am You haven't redownloaded the project.
That one is a very old version.
Thanks WWBman. I downloaded a new one and noticed the different in the script. However, I tested and it still doesn't work. Please have a look.

http://www.goec.com.au/goec2/page4.php
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

Can you share the test project you have just used (or email me it)?
Did you change anything in it?
I entered data in the first box and this was blank in the email so something must have changed!
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Sun Oct 14, 2018 11:29 am Can you share the test project you have just used (or email me it)?
Did you change anything in it?
I entered data in the first box and this was blank in the email so something must have changed!
Thanks WWBman. Can I have your email pls. Mine is petejos@hotmail.com
Thanks
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

You should have it from the reply to the test run.
Or just copy the .wbs file to the server and I’ll download it from there.
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

Email address sent.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Sun Oct 14, 2018 8:36 pm Email address sent.
wbs file sent
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

Your test project uses the built-in PHP Form Processor Script so the file extension must be php not html.
It also should have a Success page and an Error page.
The message in General/Message can be just plain text.
The Auto Responder doesn't need the message formatted as you have. Just use a plain text message. The titles and details filled in will automatically be produced by the form processor.
The Auto Responder email format can be plain text.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Sun Oct 14, 2018 9:52 pm Your test project uses the built-in PHP Form Processor Script so the file extension must be php not html.
It also should have a Success page and an Error page.
The message in General/Message can be just plain text.
The Auto Responder doesn't need the message formatted as you have. Just use a plain text message. The titles and details filled in will automatically be produced by the form processor.
The Auto Responder email format can be plain text.
Thanks WWBman. If in plain text, then i won't get a nice and neat looking email to the user?
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

Try plain text first and then see what you get.
This has nothing to do with the basic issue of not showing the entries when not filled in.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Sun Oct 14, 2018 10:16 pm Try plain text first and then see what you get.
This has nothing to do with the basic issue of not showing the entries when not filled in.
Tested your suggestion with plain text and it works. Below is what I received. However, how to hide the "Buttons"? Also, how can i have a space better indexedibox1, 2 and 3? or how can I achieve what I wanted like in the rich text format I have in my current form design?

IndexEditbox1 : Peter 1
IndexEditbox2 : Peter 2
IndexEditbox3 : Peter 3
Buttons :
Email : petejos@hotmail.com
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

Sorry, I can't think of a way to hide the buttons or format the space better, perhaps someone else can.
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

You could use the DBTS Form processor extension which is very good.
It has many options but most defaults should be fine and it doesn't include the button in its output.
I've never used the Auto Responder part of it but it should be OK.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Mon Oct 15, 2018 8:28 am You could use the DBTS Form processor extension which is very good.
It has many options but most defaults should be fine and it doesn't include the button in its output.
I've never used the Auto Responder part of it but it should be OK.
Thanks WWBman. what is DBTS and is it in the WWB builder?
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

It's a normal extension (DBTS Form Processor). You can install it from the Extension Manager in WWB.
I've just tested it using the same events and javascript and it works fine.
And the auto responder works fine as well with it.

If you want to see what the output looks like you can download the DBTS version here:
http://www.mediafire.com/file/pq5s33mf8 ... n.wbs/file

Or the DBTS help gives a good idea what it looks like.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Mon Oct 15, 2018 12:06 pm It's a normal extension (DBTS Form Processor). You can install it from the Extension Manager in WWB.
I've just tested it using the same events and javascript and it works fine.
And the auto responder works fine as well with it.

If you want to see what the output looks like you can download the DBTS version here:
http://www.mediafire.com/file/pq5s33mf8 ... n.wbs/file

Or the DBTS help gives a good idea what it looks like.
Thanks. I will give it a try.
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Combobox Condition

Post by WWBman »

BTW, after testing it I forgot to make the editboxes invisible in the Object Manager on load.
Download file amended.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

WWBman wrote: Tue Oct 16, 2018 2:23 pm BTW, after testing it I forgot to make the editboxes invisible in the Object Manager on load.
Download file amended.
Thanks WWBman for being so helpful.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

Pablo wrote: Mon Sep 17, 2018 10:07 am I'm sorry, I do not have a standard solution for this. This will require a script.
In the next update I will add support for different actions with the same value.
Hi pablo,
Just want to follow up has the update being implemented on the above mentioned?
User avatar
Pablo
 
Posts: 21575
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Combobox Condition

Post by Pablo »

Yes
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: Combobox Condition

Post by petejos »

Thanks.
Post Reply