June 12, 200322 yr Hello, Is it possible to test against a valuelistitem in an if directive? Example: <select name="from_the_list"> [FMP-ValueList:theList, list=myList] <option value="[FMP-ValueListItem]"> [FMP-if:ValueListItem.eq.specificItem] Display custom item [FMP-else] [FMP-ValueListItem] [/FMP-if] </option> [/FMP-ValueList] </select> The code above doesn't seem to work for me. Thank you in advance for any insight. Bradley
June 12, 200322 yr Author Thank you for your post reply. I think so, too. I was thinking it was a meta-FMP tag, so I tried {} as used in the Inline tag... in all various forms. No success. Maybe it just doesn't work. Bradley
June 14, 200322 yr I do not think it is correct code. How the IF can validate on server, when user is selecting something in browser? You have to select something in browser, submit that choice to WebCompanion and on next page you can have the IF evaluation.
June 15, 200322 yr Anatoli, According to the CDML Reference Database "ValueListItem" can be used as a "left-hand" argument in an "IF" tag. All of Bradley's processing is intended for the server, as it is setting-up the "Select" tags. All the best. Garry
June 15, 200322 yr In that case you are right Garry and I misunderstand the problem. If the IF is processed before the page is sent as a reaction to already entered value, it can work. If the IF is intended to be processed, as I've originally understood as reaction to user choice, then it is not correct way. When I've got stuck in such problem, after 5-10 minutes I'll give up and I am going for different logic: IF value in field = specificItem do this code -- Display custom item Else do another code <select> value list </select> Endif HTH
June 19, 200322 yr Author Thank you for you post replies. Yes, the value list should be processed by the WC as it is generated for the Web page. That's why I thought it would be natural to test the list values against a specific value while processing. Bradley
Create an account or sign in to comment