+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 13 of 13

Thread: Extension containing forms

  1. #11
    Join Date
    Dec 2008
    Posts
    11

    Default question

    Of course,

    I want to have four textboxs where users will write information. Then, when this information has been written, they will click a button to create a new subpage. In this subpage we will show the textboxs's text.

    I have done the wiki.create part, calling wiki.create with parameters and showing it in the subpage. My problem is that I don't know how to take the textbox's text and put it in a variable for passing as a parameter in the wiki.create function.

    I hope I have expressed myself correctly. Exuse me for my english

    Lots of thanks,

    Sergi

  2. #12

    Default

    Quote Originally Posted by sergi View Post
    Of course,

    I want to have four textboxs where users will write information. Then, when this information has been written, they will click a button to create a new subpage. In this subpage we will show the textboxs's text.

    I have done the wiki.create part, calling wiki.create with parameters and showing it in the subpage. My problem is that I don't know how to take the textbox's text and put it in a variable for passing as a parameter in the wiki.create function.

    I hope I have expressed myself correctly. Exuse me for my english

    Lots of thanks,

    Sergi
    have you found a solution for your problem?
    i'm going mad to resolve the same problem...
    here is my code:
    {{dhtml.inputbox{label:"Data",value:"01/01/01",publish:"data1"}}}
    {{wiki.create{label:"Crea",template:"Orario",args: {num:"0",data: data1 ,orarioentrata1:"08:00",orariouscita1:"12:00",orar ioentrata2:"13:00",orariouscita2:"14:30"}}}}

    i have proble to put the value from the inputbox to data args of the template...
    where i'm wrong?
    sorry for my english!

  3. #13
    Join Date
    Aug 2008
    Posts
    57

    Default

    One way of doing this is using the dhtml.inputbox extension. You set the 'field' to be some variable name and the 'publish' to be page.uri. This basically forces a reload of your page with ?field=value appended to the uri and you can access this in your dekiscript with __request.args.field (where field is whatever variable name you stuck in the the first place).

    I have posted a modification to dhtml.dropdown to allow the dropdown boxes to be used in a similar way here: http://forums.developer.mindtouch.co...ead.php?t=4128 I also have a modification to the dhtml.forms that uses a bunch of checkboxes that you can tick instead of inputboxes that I am happy to post if anyone is interested.

    However with this approach I notice that it forces a reload of the entire page and if the page is slow (many of mine fetch large sql datasets for display in graphs) then the whole thing takes a lot longer than I would like.

    I have also noticed some examples on the mindtouch deki site using a 'publish/subscribe' model. My question to the Mndtouch team is (a) is the pub/sub model a better one to explore and/or (b) is there anything new coming out in Lyons that can make this process of gathering user input more responsive?

    Regards

    Sean

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts