Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael Ogilvie 4 posts 24 karma points
    Apr 20, 2012 @ 21:51
    Michael Ogilvie
    0

    Post form to url

    For some reason trying to post form data to a url(url can be found below) is not working.

    I created a simply html form just to test the url and it works fine.

    <form id="form1" name="form1" method="post" action="http://marketing.pixelink.com/acton/recipientLogin?a=2704&l=l-008b&k=15151446">

      <label for="e">Email</label>

      <input type="text" name="e" id="e" />

      <input type="submit" name="submit" id="submit" value="register" />

    </form>

    What is contour doing? I tried POST and GET and both dont work.

     

  • Comment author was deleted

    Apr 21, 2012 @ 13:33

    Can you share the workflow settings?

  • Comment author was deleted

    Apr 21, 2012 @ 13:45

    Code that is executing is: 

                string[] _fields = Fields.Split(';');
    
                WebClient client = new WebClient();
                using (client) {
                    NameValueCollection values = new NameValueCollection();
    
                    if (_fields.Length > 0) {
                        foreach (string field in _fields) {
                            string[] vals = field.Split(',');
                            if (vals.Length == 3) {
    
                                string value = "";
                                string alias = vals[0];
    
                                if (!string.IsNullOrEmpty(vals[2]))
                                    value = vals[2];
                                else {
                                    value = string.Join(",", record.RecordFields[new Guid(vals[1])].Values.ConvertAll<string>(val => val.ToString()).ToArray());
                                }
    
                                values.Add(alias, value);
                            }
                        }
                        /*
                        if (!string.IsNullOrEmpty(Password) && !string.IsNullOrEmpty(UserName))
                            client.Credentials = new NetworkCredential(UserName, Password);
                        */
    
    
                    } else {
                        foreach (RecordField rf in record.RecordFields.Values) {
                            values.Add(rf.Field.Caption.Replace(" """), string.Join(",", rf.Values.ConvertAll<string>(val => val.ToString()).ToArray()));
                        }
                    }
    
    
                    client.UploadValues(Url, Method, values);
                }
    
               return WorkflowExecutionStatus.Completed;

    You can check the complete workflow code in the shared providers sourcecode download on the contour project page (bottom of page tab sourcecode)

  • Michael Ogilvie 4 posts 24 karma points
    Apr 21, 2012 @ 16:31
    Michael Ogilvie
    0

    Here is the workflow - e is just a textfield 

  • Comment author was deleted

    Apr 21, 2012 @ 16:45

    Can you reach that url from the machine the site is running on?

  • Michael Ogilvie 4 posts 24 karma points
    Apr 23, 2012 @ 13:38
    Michael Ogilvie
    0

    Doing some more testing andd it does look like I can reach it but all of the data is empty.

     

    So it does post it to the url but all of the data is empty.

     

    Has anybody used Acton software with umbraco before?

Please Sign in or register to post replies

Write your reply to:

Draft