XLForm 表單提交

2021-08-04 02:33:57 字數 4424 閱讀 5555

xlform 據說這個庫特別屌,前幾天專案需求大量的表單提交類似下圖的表單有15 個頁面。。。

開始上**....

1.匯入

#import "xlform.h"

2.繼承

@inte***ce

lsxmessagesetupvc : xlformviewcontroller

3.建立

-(void)initializeformelse

[section addformrow:row];

/***********第二個section****************/

section = [xlformsectiondescriptor formsection];

[formdescriptor addformsection:section];

row = [xlformrowdescriptor formrowdescriptorwithtag:@"isshock" rowtype:xlformrowdescriptortypebooleanswitch title:@"手機震動"];

if([[user_default valueforkey:@"isshock"] isequaltostring:@"yes"])else

[section addformrow:row];

self.form=formdescriptor;

}//設定每行row的高度

- (cgfloat)tableview:(uitableview *)tableview heightforheaderinsection:(nsinteger)section

return

cgfloat_min;

}//獲取每行的value值

-(void)formrowdescriptorvaluehaschanged:(xlformrowdescriptor *)rowdescriptor oldvalue:(id)oldvalue newvalue:(id)newvalue

rowtype的型別有好多,可以根據自己的需求選擇

//文字

nsstring *const xlformrowdescriptortypetext = @"text";

nsstring *const xlformrowdescriptortypename = @"name";

nsstring *const xlformrowdescriptortypeurl = @"url";

nsstring *const xlformrowdescriptortypeemail = @"email";

nsstring *const xlformrowdescriptortypepassword = @"password";

nsstring *const xlformrowdescriptortypenumber = @"number";

nsstring *const xlformrowdescriptortypephone = @"phone";

nsstring *const xlformrowdescriptortypetwitter = @"twitter";

//解釋

nsstring *const xlformrowdescriptortypeaccount = @"account";

nsstring *const xlformrowdescriptortypeinteger = @"integer";

nsstring *const xlformrowdescriptortypeimage = @"image";

//十進位制的

nsstring *const xlformrowdescriptortypedecimal = @"decimal";

//textview

nsstring *const xlformrowdescriptortypetextview = @"textview";

nsstring *const xlformrowdescriptortypezipcode = @"zipcode";

//push

nsstring *const xlformrowdescriptortypeselectorpush = @"selectorpush";

//ipod(使用)

nsstring *const xlformrowdescriptortypeselectorpopover = @"selectorpopover";

//sheet

nsstring *const xlformrowdescriptortypeselectoractionsheet = @"selectoractionsheet";

//alertview

nsstring *const xlformrowdescriptortypeselectoralertview = @"selectoralertview";

//pick

nsstring *const xlformrowdescriptortypeselectorpickerview = @"selectorpickerview";

//cell insert

nsstring *const xlformrowdescriptortypeselectorpickerviewinline = @"selectorpickerviewinline";

//多選(push 返回的是array)(語言)(以及返回item count)

nsstring *const xlformrowdescriptortypemultipleselector = @"multipleselector";

//ipod(使用)

nsstring *const xlformrowdescriptortypemultipleselectorpopover = @"multipleselectorpopover";

//一行雙選

nsstring *const xlformrowdescriptortypeselectorleftright = @"selectorleftright";

nsstring *const xlformrowdescriptortypeselectorsegmentedcontrol = @"selectorsegmentedcontrol";

nsstring *const xlformrowdescriptortypedateinline = @"dateinline";

nsstring *const xlformrowdescriptortypedatetimeinline = @"datetimeinline";

nsstring *const xlformrowdescriptortypetimeinline = @"timeinline";

nsstring *const xlformrowdescriptortypecountdowntimerinline = @"countdowntimerinline";

nsstring *const xlformrowdescriptortypedate = @"date";

nsstring *const xlformrowdescriptortypedatetime = @"datetime";

nsstring *const xlformrowdescriptortypetime = @"time";

nsstring *const xlformrowdescriptortypecountdowntimer = @"countdowntimer";

nsstring *const xlformrowdescriptortypedatepicker = @"datepicker";

nsstring *const xlformrowdescriptortypepicker = @"picker";

nsstring *const xlformrowdescriptortypeslider = @"slider";

nsstring *const xlformrowdescriptortypebooleancheck = @"booleancheck";

nsstring *const xlformrowdescriptortypebooleanswitch = @"booleanswitch";

nsstring *const xlformrowdescriptortypebutton = @"button";

nsstring *const xlformrowdescriptortypeinfo = @"info";

nsstring *const xlformrowdescriptortypestepcounter = @"stepcounter";

--------end--------

Flex HTTPService 提交表單

方法1 採用urlvariables物件 import mx.controls.alert import mx.rpc.events.resultevent 對提交給後台的引數進行utf 8的編碼處理 方法2 採用,同時也演示了mx state的用法,來自網上 import mx.rpc.event...

html表單提交

用來收集資訊 form中的屬性 action 提交的路徑 method get post提交表單的方式 標籤type屬性的不同的值所表示的含義 text 文字框 value表示文字框中的值 readonly表示唯讀,可以寫readonly或true disable表示標籤不可用,可以寫disable...

form表單提交

表單的enctype屬性 enctype 屬性規定在傳送到伺服器之前應該如何對表單資料進行編碼。value 值 描述在傳送前編碼所有字元 預設 multipart form data 不對字元編碼。在使用包含檔案上傳控制項的表單時,必須使用該值。text plain 空格轉換為 加號,但不對特殊字元...