How to clear data from entryfields? - Crosstec
Welcome, Guest
Please Login or Register.    Lost Password?

How to clear data from entryfields?
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: How to clear data from entryfields?
*
#9818
How to clear data from entryfields? 10 Months ago Karma: 0
Hello again.

I have a form (that is use for making limo reservations) where I dynamically hide or show some sections on my form depending on the user interaction.

For example: Section name = Airports
Element 1 name = LaGuardia
Element 2 name = JFK
Element 3 name = Newark

On this form the user will select by clicking on a radio button the airport they are leaving from. These 3 airports have a list of airlines that operate from each airport on each of the list elements I have inserted the airlines that operate from each airport.

If the user selects JFK I hide Laguardia and Newark elements. All that works fine the problem I have is. If the user select on the other airports elements and selects an airline then goes to a different airport the firt element will hide and the next will show if the user also selects another airline on that airport then I have 2 different airports with 2 different airlines, when the form is submited then I'll have 2 airports and 2 airlines on the same reservation form's information.

How do I clear the data that was inserted on an element when I switch to a different airport? (I use a radio button to switch the airports) I only want to send the information that was inserted on the elements that are visible on the form those which are hidden and might have information I don't want to send in on the form submit.

Please help on how to validate the form as I explain above. This is my first time using this component.

Thanks

Charles
antoncona
Fresh Boarder
Posts: 16
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#9836
Re: How to clear data from entryfields? 10 Months ago Karma: 16
I guess you use the visibility rules? If yes, then please paste them here.
TheMuffinMan
Moderator
Posts: 769
graph
User Offline Click here to see the profile of this user
178152063 Gender: Male koelnkalk Location: Cologne - Germany Birthday: 03/07
The administrator has disabled public write access.
 
#10113
Re: How to clear data from entryfields? 9 Months, 1 Week ago Karma: 0
This is the way I have it on my form..

turn on section passenger_info if switcher is airport
turn on section passenger_info if switcher is hotel
turn on section passenger_info if switcher is other

turn on section pickup_information if switcher is airport
turn on section pickup_airport if switcher is airport
turn off section pickup_airport if switcher is hotel
turn off section pickup_airport if switcher is other

turn on section pickup_information if switcher is hotel
turn on section pickup_hotel if switcher is hotel
turn off section pickup_hotel if switcher is airport
turn off section pickup_hotel if switcher is other

turn on section pickup_information if switcher is other
turn on section pickup_other if switcher is other
turn off section pickup_other if switcher is airport
turn off section pickup_other if switcher is hotel

turn on element lga_arriving_airline if arriving_airport is LaGuardia
turn off element jfk_arriving_airline if arriving_airport is LaGuardia
turn off element nwr_arriving_airline if arriving_airport is LaGuardia
turn off element islip_arriving_airline if arriving_airport is LaGuardia
turn off element tet_arriving_airline if arriving_airport is LaGuardia

turn on element jfk_arriving_airline if arriving_airport is JFK
turn off element lga_arriving_airline if arriving_airport is JFK
turn off element nwr_arriving_airline if arriving_airport is JFK
turn off element islip_arriving_airline if arriving_airport is JFK
turn off element tet_arriving_airline if arriving_airport is JFK

turn on element nwr_arriving_airline if arriving_airport is Newark
turn off element lga_arriving_airline if arriving_airport is Newark
turn off element jfk_arriving_airline if arriving_airport is Newark
turn off element islip_arriving_airline if arriving_airport is Newark
turn off element tet_arriving_airline if arriving_airport is Newark

turn on element islip_arriving_airline if arriving_airport is MacArthur
turn off element jfk_arriving_airline if arriving_airport is MacArthur
turn off element lga_arriving_airline if arriving_airport is MacArthur
turn off element nwr_arriving_airline if arriving_airport is MacArthur
turn off element tet_arriving_airline if arriving_airport is MacArthur

turn on element tet_arriving_airline if arriving_airport is Teterboro
turn off element jfk_arriving_airline if arriving_airport is Teterboro
turn off element lga_arriving_airline if arriving_airport is Teterboro
turn off element nwr_arriving_airline if arriving_airport is Teterboro
turn off element islip_arriving_airline if arriving_airport is Teterboro
antoncona
Fresh Boarder
Posts: 16
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#12409
Re: How to clear data from entryfields? 6 Months, 1 Week ago Karma: 0
I would like to refresh a bit this thread...

Is there a way to clear data placed in a section which was turned off by the user?

Let's say there is a checkbox_1: a user checked it and a section_1 has appeared. In the section there are few various fields: radiobuttons, text fields, etc.
But suddenly the user decided to turn the section_1 off.
Is there a way to clear the data placed in the section_1 which have been hidden?
Slawinski
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#12822
Re: How to clear data from entryfields? 5 Months, 3 Weeks ago Karma: 0
I have similar question like Slawinski. Is there a way to clear data placed in a section which was turned off by the user?

I'm a newbie with this tool and I would like to know how can I put some custom script (in this case this particular example) in QuickMode form.

Thank you!
bayshanac
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#14086
Re: How to clear data from entryfields? 2 Months, 2 Weeks ago Karma: 0
This is exactly what I am looking for too, PLEASE HELP!!!
jucream
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: TheMuffinMan