Take a look at ReFind and Chapter 7 of Developing Coldfusion MS Apps.

There are a few reg exp generators around, that will allow you to build an 
expression by starting with your string, and selecting the bits you want.



>>> [EMAIL PROTECTED] 06/17/05 11:50 am >>>
Thanks Scott. I would have approached it in a similar way but the
client insists on one field to define the options. (Actually there is
a whole lot of client side javascript so they don't want to rehash
that as well).

The form where these options are displayed is made up of multiple
records like below.

rule1
form.optiondefinition_1 = 
<option value=10>$10</option> 
<option value=20 selected>$20</option>...

rule2
form.optiondefinition_2 = 
<option value=100>$110</option>
<option value=110 selected>$110</option>...

rule3
form.optiondefinition_3 = 
<option value=1000>$1000</option>
<option value=1100>$1100</option>...

I really need to work out the best way to move option values out of
the single form field into an array. I was thinking there could be
some regex wizardry rather than parsing into xml??


On 17/06/05, Scott Thornton <[EMAIL PROTECTED]> wrote:
> make the user enter "value", "selected y or no" , and "display text" into 
> separate fields... then build it up whatever way you want to....
> 
> >>> [EMAIL PROTECTED] 06/17/05 10:19 am >>>
> Hoping to get your thoughts or approaches to this problem.
> 
> I have a form where a user can define a select field to use in other
> forms. They basically list out the options that will be available. So
> for example in the definition (a text form field) they would enter
> something like this....
> 
> Rule 1
> <option value=10>$10</option>
> <option value=20 selected>$20</option>
> <option value=30>$30</option>
> 
> Now I need to do some server side validation on this form field to
> make sure that the options are properly constructed. I've been playing
> with converting the field to an xml object then moving the options
> into an array and testing on this. Is this the best approach or is
> there another better/simpler/lazy way to do it?
> 
> Thanks in advance.
> Angus
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED] 
> To unsubscribe send a blank email to [EMAIL PROTECTED] 
> Aussie Macromedia Developers: http://lists.daemon.com.au/ 
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED] 
> To unsubscribe send a blank email to [EMAIL PROTECTED] 
> Aussie Macromedia Developers: http://lists.daemon.com.au/ 
>

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED] 
To unsubscribe send a blank email to [EMAIL PROTECTED] 
Aussie Macromedia Developers: http://lists.daemon.com.au/


---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to