Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

AND/OR problem with CDML booking system

Featured Replies

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

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

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>

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.