以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  使用FormAction方法无法post某个值  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=169104)

--  作者:rjh4078
--  发布时间:2021/6/2 20:43:00
--  使用FormAction方法无法post某个值
Dim kwh As String

For Each key As String In e.PostValues.Keys
            
messagebox.show(key & e.PostValues(key) )
        Next

If e.GetValues.ContainsKey("deldid") Then
    DataTables("库位明细").SQLDeleteFor("_Identify = " & e.GetValues("deldid"))
End If

If e.GetValues.ContainsKey("kwh") Then
    kwh=e.GetValues("kwh")
    wb.AddForm("","form1","kw.htm")
    With wb.AddInputGroup("form1","ipg1","库位信息" )
        With .AddInput("kwh","库位:","text")
            .value=kwh
            .Readonly= True
        End With
        
        With .AddInputCell("ic1")
            .AddLabel("产品编号","产品编号:",0)
            .AddInput("number","text",1)
            .AddVcodeButton("scan","扫码",2) \'增加二维码扫描按钮,2表示显示在右边
        End With
        With .AddInput("数量","数量:","number")
        End With
        
        With wb.AddPanelGroup("","pg2","货架明细")
            For Each dr As DataRow In DataTables("库位明细").SQLSelect("库位号=\'" & e.GetValues("kwh") & "\'")
                With .Add(dr("_identify"), dr("产品编号") &  " : "  & dr("产品名称"), "数量:" & dr("数量") & "  采集人:" & dr("采集人") & "    采集时间:" & dr("采集时间"),"./images/商品查询.png","kwdetails.htm?id=" & dr("_identify") )
                    
                End With
            Next
        End With
        
    End With
    
End If

With wb.AddButtonGroup("form1","btg1",True)
    .Add("btn1", "添加", "submit").FormAction="kw.htm?kwh=" & kwh
End With


使用FormAction执行这段代码的时候 发现post值里没有库位(kwh)这个值

如果改成
With wb.AddButtonGroup("form1","btg1",True)
    .Add("btn1", "添加", "submit")
End With
是正常的,求指点迷津


--  作者:有点蓝
--  发布时间:2021/6/3 8:57:00
--  
wb.AddForm("","form1","kw.htm?kwh=" & kwh)
……
With wb.AddButtonGroup("form1","btg1",True)
    .Add("btn1", "添加", "submit")
End With