Online Book Reader

Home Category

Facebook Cookbook - Jay Goldman [76]

By Root 622 0

value="7">Julvalue="9">Sepvalue="10">Octvalue="11">Novvalue="12">Decname="date_day" id="date_day">value="1">1value="2">2value="4">4value="5">5value="6">6value="8">8value="9">9value="10">10value="11">11value="13">13value="14">14value="15">15value="16">16value="17">17value="18">18value="19">19value="20">20value="21">21value="22">22value="23">23value="25">25value="26">26value="27">27value="30">30value="31">31class="right_padding">

class="divider">

Cream:

value="Give me Ice Cream!" />

orCancel

NOTE

It’s worth noting that this XHTML is actually invalid. Challenge your powers of perception and go find the two validation errors! Back? Got ’em? No? OK, I’ll tell you, but only this time. The various select options that are marked as selected should be marked as selected="selected" in XHTML, and the textarea is missing the rows and cols attributes.

Each of the tags within the form has its own set of optional parameters (with the exception of fb:editor-divider, fb:editor-buttonset, and fb:editor-cancel, which are simplicity defined), discussed next.

fb:editor


The fb:editor tags wrap the whole kit and caboodle, defining the start and end of the form. These replace the HTML form tag, so you don’t need to include one in addition to them. Its parameters are listed in Table 6-9.

Table 6-9. Parameters for fb:editor

Name

Type

Default value

Description

action

string

N/A

The URL to post the form to. This is the only required field.

width

int

425

Width of the fields column, in pixels.

labelwidth

int

75

Width of the labels column, in pixels.

Note that the total width of the table will be width + labelwidth, and so it defaults to 500 pixels.

fb:editor-custom


The fb:editor-custom tag is used to insert any valid block of FBML into your form. In the example shown earlier, it’s used to both display some static text in the field column and include a select with ice cream flavors. Its parameter is listed in Table 6-10.

Table 6-10. Parameter for fb:editor-custom

Name

Type

Default value

Description

label

string

N/A

Label to display in the label column.

fb:editor-text


The fb:editor-text tag is equivalent to an HTML . Its parameters are listed in Table 6-11.

Table 6-11. Parameters for fb:editor-text

Name

Type

Default value

Description

label

string

N/A

Label to display in the label column.

name

string

N/A

Name of the control, which will become the variable containing the value in the POST.

value

string

N/A

Default string to put into the field.

maxlength

Return Main Page Previous Page Next Page

®Online Book Reader