Sending FORM with colon through cURL

I’m Facing an issue Posting a Form through cURL, using CURLSMBS.FormAdd

Everything is fine when I put the ID of an element in the form to be filled

But the Issue cames when I need to Fill an Input with Colon on its name, for example: “idt8:Empresa”
Googling I tried to replace the colon with “%3A” but without success

Is there a way to do it?

Thanks

[quote=375502:@Gerardo García]I’m Facing an issue Posting a Form through cURL, using CURLSMBS.FormAdd

Everything is fine when I put the ID of an element in the form to be filled

But the Issue cames when I need to Fill an Input with Colon on its name, for example: “idt8:Empresa”
Googling I tried to replace the colon with “%3A” but without success, example: “idt%3AEmpresa”
Also tried: “idt\\:Empresa”
Is there a way to do it?

Thanks[/quote]

What do you use exactly with FormAdd?
The newer FormAddField method is better than the old functions.
And with FormData property, you can see the form data sent for debugging.
What’s inside?

[quote=375505:@Christian Schmitz]What do you use exactly with FormAdd?
The newer FormAddField method is better than the old functions.
And with FormData property, you can see the form data sent for debugging.
What’s inside?[/quote]

Ok, thats What I’m trying to do, I have several Input on a form:

I used the ID of each INPUT control, as always do in other Forms, but in other forms ID names doesn’t have colon

so what does FormData say?

Or if you have a html form, you can change it’s destination URL to http://monkeybreadsoftware.de/filemaker/echo.cgi and see in result what it sent. So you can compare.

It tells me this:

Got the following headers:

HTTP_HOST: monkeybreadsoftware.de HTTP_ACCEPT: / Query: Post data is (764 chars): --------------------------15e50aa8b709a13f Content-Disposition: form-data; name=“j_idt8” j_idt8 --------------------------15e50aa8b709a13f Content-Disposition: form-data; name=“j_idt8:nombreEmpresa” Constructora y Edificadora 2013 SA de CV --------------------------15e50aa8b709a13f Content-Disposition: form-data; name=“j_idt8:rfcEmpresa” CED130828MJ8 --------------------------15e50aa8b709a13f Content-Disposition: form-data; name=“j_idt8:appatLegal” MUNOZ --------------------------15e50aa8b709a13f Content-Disposition: form-data; name=“j_idt8:apmatLegal” GONZALEZ --------------------------15e50aa8b709a13f Content-Disposition: form-data; name=“j_idt8:primerNombreLegal” JUAN ANTONIO --------------------------15e50aa8b709a13f–

That looks right.
So check what is different to when you use other software or maybe the problem is on the receiving side?

What exactly is the issue? Are you receiving an error page? An error number from curl?

I don’t give an error as is.
the issue here is that the field or inputs are not filled when I do the POST like in other URLS.

So that is my code:

dim e as integer
dim d as new UploadCURL

d.OptionURL = "https://wbc2.burodecredito.com.mx:8474/rceonline-pm/pages/datos-generales.xhtml"
'j_idt8:Siguiente


d.OptionVerbose = True
d.CollectOutputData = true
d.CollectHeaderData = true

'Persona Fisica con actividad empresarial
d.FormAdd(d.kFormCopyName,"j_idt8", d.kFormCopyContents, "j_idt8")
d.FormAdd(d.kFormCopyName,"j_idt8:nombreEmpresa", d.kFormCopyContents, "Constructora y Edificadora 2013 SA de CV")
d.FormAdd(d.kFormCopyName,"j_idt8:rfcEmpresa", d.kFormCopyContents, "CED130828")
d.FormAdd(d.kFormCopyName,"j_idt8:homoclaveEmpresa", d.kFormCopyContents, "MJ8")
d.FormAdd(d.kFormCopyName,"j_idt8:appatLegal", d.kFormCopyContents, "MUNOZ")
d.FormAdd(d.kFormCopyName,"j_idt8:apmatLegal",   d.kFormCopyContents, "GONZALEZ")
d.FormAdd(d.kFormCopyName,"j_idt8:primerNombreLegal",   d.kFormCopyContents, "JUAN")    
d.FormAdd(d.kFormCopyName,"j_idt8:segundoNombreLegal",   d.kFormCopyContents, "ANTONIO")
d.FormAdd(d.kFormCopyName,"j_idt8:email",   d.kFormCopyContents, "ggarcia@cye2013.net")
d.FormAdd(d.kFormCopyName,"j_idt8:confirmacionEmail",   d.kFormCopyContents, "ggarcia@cye2013.net")
d.FormAdd(d.kFormCopyName,"j_idt8:telefono",   d.kFormCopyContents, "5567985969")
d.FormAdd(d.kFormCopyName,"j_idt8:calle",   d.kFormCopyContents, "CALZADA DE TLALPAN 476")
d.FormAdd(d.kFormCopyName,"j_idt8:codigoPostal",   d.kFormCopyContents, "08200")
d.FormAdd(d.kFormCopyName,"j_idt8:estado",   d.kFormCopyContents, "CDMX,6000090")
d.FormAdd(d.kFormCopyName,"j_idt8:ciudad",   d.kFormCopyContents, "CIUDAD DE MEXICO")
d.FormAdd(d.kFormCopyName,"j_idt8:municipio",   d.kFormCopyContents, "IZTACALCO")
d.FormAdd(d.kFormCopyName,"j_idt8:colonia",   d.kFormCopyContents, "VIADUCTO PIEDAD")
d.FormAdd(d.kFormCopyName,"j_id1:javax.faces.ViewState:0",   d.kFormCopyContents, "6350429936611248702:166684178122360578") 
d.FormAdd(d.kFormCopyName,"j_idt8:Siguiente",   d.kFormCopyContents, "j_idt8:Siguiente")

d.FormFinish

e=d.Perform

ListBox1.AddRow "Result: "+str(e)
ListBox1.AddRow d.GetInfoContentType

Result.text = d.OutputData.DefineEncoding(Encodings.UTF8)

'HTMLViewer1.LoadPage d.OutputData, nil

Dim f as FolderItem = GetTemporaryFolderItem
HTMLViewer1.LoadPage Result.text, f

Does http://documentation.xojo.com/index.php/EncodeURLComponent help at all if you massage the data before sending it into CURLMBS?

So, the webpage is supposed to contain a form that’s already filled-in using the values you’re sending?

Yeah of course thats what intended to be, I’m playing with that,