Jump to content

This topic is 7437 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am making a system using CDML for booking places on events.

I have a page at

http://216.168.37.92/peterb/eventbooker/client_search.htm

which allows the visitor to enter their booking reference and password to view the status of their booking but there are two problems with it:

1. The search needs to only return the record if the visitor enters the booking reference AND the password correctly. I've put

<INPUT TYPE="hidden" NAME="-lop" VALUE=AND>

in the file but if they leave the password field blank (or the reference!) How can I force this behavior?? I've tried a couple of scripts to combine the two fields into one and then search with that with no success yet and setting the "-lop" value to "==" doesn't do it either frown.gif As a temporary measure I've had to ask clients to combine the two themselves into a field which isn't satisfactory

2. When the file is returned I want to include a "field within a field" - So in the dropdown valuelist (itself a field) our staff will use to choose the status of the booking each value includes the name of the event. I have tried using the ,format and ,raw commands with no success, it just returns, for example 'Booking Reserved for [FMP-Field: Event]'

To see the raw search results file go to:

http://216.168.37.92/peterb/eventbooker/client_search_results.htm

The example booking that's on there made has this reference number: 802469128500

and this password: test

Many thanks for your help smile.gif

Posted

Try this:

1. <INPUT TYPE="hidden" NAME="-op" VALUE="=="> just before the "password" field. Note the "-lop" is not needed as the default is "AND" (the format would be name="-lop" value="AND".

Or:

<INPUT TYPE="hidden" NAME="password" VALUE="=="> just before the:

<INPUT TYPE="password" NAME="password" VALUE="">

2. The "dropdown" could look like this (if the ValueList is named "Events"):

<select name="Event">

[FMP-ValueList: Event, List=Events]

<option value="[FMP-ValueListItem]" [FMP-ValueListChecked]>[FMP-ValueListItem]</option>

[/FMP-ValueList]

</select>

All the best.

Garry

Posted

Hi, I've been using a Javascript to check that certain fields are filled in.

This looks for any field prefixed "check". I think it will work with dropdowns if the rdeault is "-no selection-"

<HTML>

<HEAD>

<SCRIPT LANGUAGE="JavaScript"><!-- Begin

function checkTheForm(which) {

var pass=true;

if (document.images) {

for (i=0;i<which.length;i++) {

var tempobj=which.elements;

if (tempobj.name.substring(0,5)=="check") {

if (((tempobj.type=="text"||tempobj.type=="password")&&

tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&

tempobj.selectedIndex==0)) {

pass=false;

break;

}

}

}

}

if (!pass) {

shortFieldName=tempobj.name.substring(8,30).toUpperCase();

alert("You must fill in both name and password");

return false;

}

else

return true;

}

// End --></script>

</HEAD>

><FORM ACTION="FMPro" METHOD="post" name=enterform onsubmit="return checkTheForm(this)">

<P>name<BR>

<INPUT TYPE=text NAME="check_username" VALUE="" SIZE=26><BR>

password<BR>

<INPUT TYPE=password NAME="check_password" VALUE="" SIZE=26><BR>

<INPUT TYPE="submit" NAME="-Find" VALUE="submit">

</FORM></FONT></P>

</BODY>

</HTML>

This topic is 7437 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.