tags:

views:

535

answers:

1

how do i submit data from a form inside fbml modal dialog window

A: 

You can do it by multiple ways [Mock ajax , Send data by URL], but still i need to test that normal action mechanism is working or not , Surely using Mock ajax you can accomplish your task

Here is an example (Directly from FB wiki , if you need more info please notify me )

<fb:dialog id="my_dialog"> 
   <fb:dialog-title>My Little Dialog</fb:dialog-title>
   <fb:dialog-content><form id="my_form">Do you like my little dialog?</form>          </fb:dialog-content> 
  <fb:dialog-button type="submit" value="Yes" clickrewriteurl="http://www.someurl.com/response.php" clickrewriteid="my_dialog" clickrewriteform="my_form" /> 
   </fb:dialog> 
    I don't know what link to put, how about <a href="#" clicktoshowdialog="my_dialog"     style="border-top: solid 1px">this one?</a> The contents of http://www.someurl.com/response.php should print out FBML wrapped in fb:dialogresponse.

 <fb:dialogresponse> <fb:dialog-title>My Little Dialog Part II</fb:dialog-title> 
    <fb:dialog-content>I'm glad you like my dialog</fb:dialog-content> <fb:dialog-button type="button" value="Close" close_dialog=1 /> 
  </fb:dialogresponse>
vinayrks
dear vinayrkismany thanks for your answer can we send the data/via post/get method like <input type="hidden" value="<?php echo $data['uid']?>" />to file processing file that we define in a button like :<fb:dialog-button type="submit" value="Okay" form_id="nickname_form" href="<?php echo $callback_url;?>gantinamamotor.php"/>
ponidi
still i need to test normal method get or Post is applicable in fb:dialog box or not , but i think it should work but you can very easily do that using MOCK ajax
vinayrks