We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23050
    • 1,842 Posts
    Aaaah !!! Was waiting for it... I’m back after the upgrade wink
      • 23050
      • 1,842 Posts
      Ok works fine with &model=`0` wink Thanks a lot !

      And I love the fact that the doc is created only when the form is saved wink

      Now, to go further :

      1- No email is sent. I use the parameter explained here
      2- I’m using the [+introtext+] as part of my form but no introtext is saved in the doc created (pagetitle and content are saved)
      3- I’m not sure the validation message works on my install... I don’t get anything after saving the doc, I’m redirected to the homepage (I will try to make a form only with eForm too see if the problem comes from eForm or FDM)
      4- I try to use &output with [+fdmeForm+] but the form is still displayed where the call is. (I put the [+fdmeForm+] in the template)

      Here is the call :
      [!FDM? &parent=`2` &anonymous=`1` &eform_tpl=`fdmEformannu` &model=`0` &language=`french` &eform_to=`[email protected]` &eform_subject=`Nouveau communiqué sur l'annuaire déco` &eform_report=`ReportFDMForm` &output=`0`!]


      And the form :
      [+validationmessage+]
      <div class="formPage CommPress">
      <form method="post" action="[~[*id*]~]"  id="fdmForm">
      <input type="hidden" name="formid" value="fdmForm" />
      
      	<label class="label" for="titre-commu" >Titre de votre communiqué<span class="req">* </span></label>
      	<input type="text" id="titre-commu" name="pagetitle" size="68" maxlength="255" value="[+pagetitle+]" eform="Indiquez le titre de votre communiqué:string:1"/>
      
      	<label class="label" for="introtext-commu" >Résumé de votre communiqué<span class="req">* </span></label>
      <p>Le résumé apparaît dans la liste des communiqués - comme les extraits des résultats dans les moteurs de recherche</p>
      	<textarea id="introtext-commu" name="introtext" cols="92" rows="5" eform="Indiquez le résumé de votre communiqué:string:1">[+introtext+]</textarea>
      
      	<label class="label" for="content-commu" >Texte de votre communiqué<span class="req">* </span></label>
      <p>Indiquer un moyen pour vous contacter : téléphone, adresse e-mail, adresse postale. Renseigner aussi votre site web s'il y a lieu.</p>
      	<textarea name="content" id="content-commu" rows="5" cols="92"  eform="Indiquez le contenu de votre communiqué:html:1">[+content+]</textarea>
      
      <input name="fdmsubmit" value="Soumettre" type="submit" />
      
      </form>
      </div>


      I’ll be back wink

      Edit : By the way : even with &anonymous=`1`, the doc is published
        • 27889
        • 415 Posts
        Ok I have found the problem, just an other thing to correct with ditto use and I repost a new one
          MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
          MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
          • 17883
          • 1,039 Posts
          Line 121,122 in fdm.class.inc.php

          		$this->link['add'] = $this->info['add link']=$this->link['editorpageid'].'?fdmaction=add'.$this->config['md5'].'&fdmmodel='.$this->doc['model'].'&fdmparent='.$this->doc['parent'];	
          		$this->link['edit'] = $this->info['edit link']=$this->link['editorpageid'].'?fdmaction=edit'.$this->config['md5'].'&fdmid='.$this->doc['id'];
          


          should be

          		$this->link['add'] = $this->info['add link']=$this->link['editorpageid'].'&fdmaction=add'.$this->config['md5'].'&fdmmodel='.$this->doc['model'].'&fdmparent='.$this->doc['parent'];	
          		$this->link['edit'] = $this->info['edit link']=$this->link['editorpageid'].'&fdmaction=edit'.$this->config['md5'].'&fdmid='.$this->doc['id'];
          


          & instead of ? in the Link for fdmaction.
            • 29039
            • 58 Posts
            @soda. What you think about this?

            $this->config[’editorpageid’]=$this->doc[’model’]!=0?$this->doc[’model’]:$modx->documentIdentifier;
            $this->link[’editorpageid’]=$modx->makeUrl($this->config[’editorpageid’]);

            $this->link[’add’] = $this->info[’add link’]=$this->link[’editorpageid’].’?fdmaction=add’.$this->config[’md5’].’&fdmmodel=’.$this->doc[’model’].’&fdmparent=’.$this->doc[’parent’];

            $this->link[’edit’] = $this->info[’edit link’]=$this->link[’editorpageid’].’?fdmaction=edit’.$this->config[’md5’].’&fdmid=’.$this->doc[’id’];
            $this->link[’delete’] = str_replace(’&amp;’,’&’,$modx->makeUrl($modx->documentIdentifier,’’,’&fdmaction=delete’.$this->config[’md5’].’&fdmid=’.$this->doc[’id’]));
            $this->link[’publish’] = str_replace(’&amp;’,’&’,$modx->makeUrl($modx->documentIdentifier,’’,’&fdmaction=publish’.$this->config[’md5’].’&fdmid=’.$this->doc[’id’]));
            $this->link[’unpublish’] =str_replace(’&amp;’,’&’,$modx->makeUrl($modx->documentIdentifier,’’,’&fdmaction=unpublish’.$this->config[’md5’].’&fdmid=’.$this->doc[’id’]));

            we can use model page as editor page and my tvfields snipet

            ps. Bug with redirect to new or edited page url. (allok function)
              • 27889
              • 415 Posts
              new version 0.9.1 mail should work.
              I have a problem with hidden field which does not validate, I will ask for that, or if you have an idea:
              in eForm tpl: <input type="hidden" name="fdmid" id="fdmid" value="[+fdmid+]" /> never validate until I put it as type=text, same with &sessionVars.

              Somes (big) bugs corrected.
              @swit4er, this part is not ended and will surely change to allow an other page for editing with a parameter.

              I don’t want add an other snippet now, I have enough to check with my own code.
              25 hours for FDM this week-end, I’m tired.
                MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
                MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
                • 30328
                • 35 Posts
                Hi,

                I might be using it wrong, but I think there is a problem with 0.9.1. After clicking the icon to create a new document, I get a blank page. In version 0.9 the create document seemed to work fine (except with a problem with friendly urls forwarding to a strange URL),

                Tommy T.
                  • 22095
                  • 30 Posts
                  I’ve created a new document, id 192, not cachable, which contains:
                  [!FDM? &parent=`192` &canmoderate=`BlogAdmins` &eform_tpl=`fdmEform` &model=`0`!]


                  Deleting and Unpublishing works fine, adding and editing doesn’t, no form is displayed.

                  Any ideas?

                  And Here’s the debug info if I enable debug=`all`:
                  language : File /home/web27463/domains/kulingvarning.nu/public_html/assets/snippets/FDM/lang/english.inc.php.inc.php found
                  doc id : 192
                  parent id : 192
                  published doc : 1
                  created by : 1
                  model id : 0
                  action : none
                  user id : -1
                  is anonymous : 0
                  is author : 0
                  is moderator : 1
                  is trusted :
                  is poster :
                  can add : 1
                  can edit : 1
                  can publish : 1
                  publish doc : 1
                  add link : /~web27463/fdmtest.html&fdmaction=addfaa222ec0c3eb93cd1e8b7f8bd11786e&fdmmodel=0&fdmparent=192
                  edit link : /~web27463/fdmtest.html&fdmaction=editfaa222ec0c3eb93cd1e8b7f8bd11786e&fdmid=192
                  template links :
                  @CODE:
                  <span class="fdm-mod" style="">
                  
                  	":is="0":then="
                  		<a href="" onclick="return confirm('Are you sure you wish to add a document?')" title="Add Document"><img src="/~web27463/manager/media/style/MODx/images/icons/folder_page_add.gif" width="18" height="18" alt="New Document" border="0" /></a>
                  	":strip+]
                  	
                  	[+link.disableedit:is="0":then="
                  		":is="1":then="
                  		<a href="" onclick="return confirm('Are you sure you wish to edit this Document?')" title="Edit Document"><img src="/~web27463/manager/media/style/MODx/images/icons/logging.gif" width="16" height="16" alt="Edit " border="0" /></a>
                  		":strip+]
                  	"+]
                  [+user.ismoderator:is="1":then="
                  	":is="0":then="
                  		<a href="" onclick="return confirm('Are you sure you wish to publish this Document?')" title="Publish Document"><img src="/~web27463/manager/media/style/MODx/images/icons/add.png" width="16" height="16" alt="Publish " border="0" /></a>
                  	":strip+]
                  	":is="0":then="
                  		<a href="" onclick="return confirm('Are you sure you wish to unpublish this Document?')" title="Unpublish Document"><img src="/~web27463/manager/media/style/MODx/images/icons/delete.png" width="16" height="16" alt="Unpublish " border="0" /></a>
                  	":strip+]
                  	[+link.disabledelete:is="0":then="
                  		<a href="" onclick="return confirm('Are you sure you wish to delete this Document?')" title="Delete Document"><img src="/~web27463/manager/media/style/MODx/images/icons/event3.gif" width="16" height="16" alt="Delete " border="0" /></a>			 
                  	":strip+]
                  "+]
                  </span>	
                  <br style="clear:both;"/>
                  template form : fdmEform
                  eForm id : fdmForm
                  eForm report :
                  eForm thankyou :
                  eForm to : [email protected]
                  eForm no email :
                  eForm subject : FDM: notification http://miraculix.kontrollpanelen.se/~web27463/
                  eForm auto sender :
                  debug all
                  CFDM Object
                  (
                      [config] => Array
                          (
                              [language] => english
                              [realdelete] => 0
                              [debug] => all
                              [output] => 0
                              [action] => none
                              [permissions] => Array
                                  (
                                      [post] => Array
                                          (
                                          )
                  
                                      [moderate] => Array
                                          (
                                              [0] => BlogAdmins
                                          )
                  
                                      [trusted] => Array
                                          (
                                          )
                  
                                  )
                  
                              [moderation] => Array
                                  (
                                      [disablemanager] => 0
                                      [moderated] => 0
                                  )
                  
                              [anonymousallowed] => 0
                              [topublish] => 1
                              [editorpageid] => 192
                              [md5] => faa222ec0c3eb93cd1e8b7f8bd11786e
                          )
                  
                      [eFormParameters] => Array
                          (
                          )
                  
                      [user] => Array
                          (
                              [id] => -1
                              [ismanager] => 0
                              [isanonymous] => 0
                              [isauthor] => 0
                              [ismoderator] => 1
                              [istrusted] => 
                              [isposter] => 
                              [canadd] => 1
                              [canedit] => 1
                              [candelete] => 1
                              [canpub] => 1
                          )
                  
                      [doc] => Array
                          (
                              [id] => 192
                              [parent] => 192
                              [published] => 1
                              [createdby] => 1
                              [model] => 0
                          )
                  
                      [ctime] => 1182696325
                      [templates] => Array
                          (
                              [link] => Array
                                  (
                                      [tpl] => @CODE:
                  
                  
                  	`:is=`0`:then=`
                  		
                  	`:strip+]
                  	
                  	[+link.disableedit:is=`0`:then=`
                  		`:is=`1`:then=`
                  		
                  		`:strip+]
                  	`+]
                  [+user.ismoderator:is=`1`:then=`
                  	`:is=`0`:then=`
                  		
                  	`:strip+]
                  	`:is=`0`:then=`
                  		
                  	`:strip+]
                  	[+link.disabledelete:is=`0`:then=`
                  					 
                  	`:strip+]
                  `+]
                  	
                  
                  
                                  )
                  
                          )
                  
                      [path] => /home/web27463/domains/kulingvarning.nu/public_html/assets/snippets/FDM/
                      [client] => Array
                          (
                              [ip] => 81.236.231.250
                              [ua] => mozilla/5.0 (macintosh; u; ppc mac os x; sv-se) applewebkit/522.11 (khtml, like gecko) version/3.0.2 safari/522.12
                              [browser] => sf
                              [long_name] => safari
                              [version] => 522.12
                              [maj_ver] => 522
                              [min_ver] => .12
                              [letter_ver] => 
                              [javascript] => 1.5
                              [platform] => mac
                              [os] => osx
                              [language] => sv-se
                              [gecko] => 
                              [gecko_ver] => 
                              [html] => true
                              [images] => true
                              [frames] => true
                              [tables] => true
                              [java] => true
                              [plugins] => true
                              [css2] => true
                              [css1] => true
                              [iframes] => true
                              [xml] => true
                              [dom] => true
                              [hdml] => false
                              [wml] => false
                              [must_cache_forms] => false
                              [avoid_popup_windows] => false
                              [cache_ssl_downloads] => false
                              [break_disposition_header] => false
                              [empty_file_input_value] => false
                              [scrollbar_in_way] => false
                          )
                  
                      [userT] => Array
                          (
                              [loggedIn] => 1
                              [id] => 1
                              [username] => Ola
                              [usertype] => web
                          )
                  
                      [parameters] => Array
                          (
                              [language] => 
                              [debug] => all
                              [id] => 
                              [parent] => 192
                              [model] => 0
                              [output] => 
                              [disableadd] => 
                              [disableedit] => 
                              [disablepublish] => 
                              [disableunpublish] => 
                              [disabledelete] => 
                              [moderated] => 
                              [disablemanager] => 
                              [guestname] => 
                              [canpost] => 
                              [canview] => 
                              [canedit] => 
                              [canmoderate] => BlogAdmins
                              [trusted] => 
                              [notify] => 
                              [aliastype] => 
                              [realdelete] => 
                              [tplLinks] => 
                              [eform_tpl] => fdmEform
                              [eform_formid] => 
                              [eform_report] => 
                              [eform_thankyou] => 
                              [eform_to] => 
                              [eform_noemail] => 
                              [eform_subject] => 
                              [eform_autosender] => 
                              [eform_debug] => 
                          )
                  
                      [info] => Array
                          (
                              [language] => File /home/web27463/domains/kulingvarning.nu/public_html/assets/snippets/FDM/lang/english.inc.php.inc.php found
                              [doc id] => 192
                              [parent id] => 192
                              [published doc] => 1
                              [created by] => 1
                              [model id] => 0
                              [action] => none
                              [user id] => -1
                              [is anonymous] => 0
                              [is author] => 0
                              [is moderator] => 1
                              [is trusted] => 
                              [is poster] => 
                              [can add] => 1
                              [can edit] => 1
                              [can publish] => 1
                              [publish doc] => 1
                              [add link] => /~web27463/fdmtest.html&fdmaction=addfaa222ec0c3eb93cd1e8b7f8bd11786e&fdmmodel=0&fdmparent=192
                              [edit link] => /~web27463/fdmtest.html&fdmaction=editfaa222ec0c3eb93cd1e8b7f8bd11786e&fdmid=192
                              [template links] => 
                  @CODE:
                  <span class="fdm-mod" style="">
                  
                  	":is="0":then="
                  		<a href="" onclick="return confirm('Are you sure you wish to add a document?')" title="Add Document"><img src="/~web27463/manager/media/style/MODx/images/icons/folder_page_add.gif" width="18" height="18" alt="New Document" border="0" /></a>
                  	":strip+]
                  	
                  	[+link.disableedit:is="0":then="
                  		":is="1":then="
                  		<a href="" onclick="return confirm('Are you sure you wish to edit this Document?')" title="Edit Document"><img src="/~web27463/manager/media/style/MODx/images/icons/logging.gif" width="16" height="16" alt="Edit " border="0" /></a>
                  		":strip+]
                  	"+]
                  [+user.ismoderator:is="1":then="
                  	":is="0":then="
                  		<a href="" onclick="return confirm('Are you sure you wish to publish this Document?')" title="Publish Document"><img src="/~web27463/manager/media/style/MODx/images/icons/add.png" width="16" height="16" alt="Publish " border="0" /></a>
                  	":strip+]
                  	":is="0":then="
                  		<a href="" onclick="return confirm('Are you sure you wish to unpublish this Document?')" title="Unpublish Document"><img src="/~web27463/manager/media/style/MODx/images/icons/delete.png" width="16" height="16" alt="Unpublish " border="0" /></a>
                  	":strip+]
                  	[+link.disabledelete:is="0":then="
                  		<a href="" onclick="return confirm('Are you sure you wish to delete this Document?')" title="Delete Document"><img src="/~web27463/manager/media/style/MODx/images/icons/event3.gif" width="16" height="16" alt="Delete " border="0" /></a>			 
                  	":strip+]
                  "+]
                  </span>	
                  <br style="clear:both;"/>
                  
                              [template form] => fdmEform
                              [eForm id] => fdmForm
                              [eForm report] => 
                              [eForm thankyou] => 
                              [eForm to] => [email protected]
                              [eForm no email] => 
                              [eForm subject] => FDM: notification http://miraculix.kontrollpanelen.se/~web27463/
                              [eForm auto sender] => 
                          )
                  
                      [link] => Array
                          (
                              [disableadd] => 0
                              [disableedit] => 0
                              [disablepublish] => 0
                              [disableunpublish] => 0
                              [disabledelete] => 0
                              [editorpageid] => /~web27463/fdmtest.html
                              [current] => /~web27463/fdmtest.html
                              [parent] => /~web27463/fdmtest.html
                              [add] => /~web27463/fdmtest.html&fdmaction=addfaa222ec0c3eb93cd1e8b7f8bd11786e&fdmmodel=0&fdmparent=192
                              [edit] => /~web27463/fdmtest.html&fdmaction=editfaa222ec0c3eb93cd1e8b7f8bd11786e&fdmid=192
                              [delete] => /~web27463/fdmtest.html?fdmaction=deletefaa222ec0c3eb93cd1e8b7f8bd11786e&fdmid=192
                              [publish] => /~web27463/fdmtest.html?fdmaction=publishfaa222ec0c3eb93cd1e8b7f8bd11786e&fdmid=192
                              [unpublish] => /~web27463/fdmtest.html?fdmaction=unpublishfaa222ec0c3eb93cd1e8b7f8bd11786e&fdmid=192
                          )
                  
                      [eform] => Array
                          (
                              [tpl] => fdmEform
                              [formid] => fdmForm
                              [report] => 
                              [thankyou] => 
                              [to] => [email protected]
                              [noemail] => 
                              [subject] => FDM: notification http://miraculix.kontrollpanelen.se/~web27463/
                              [autosender] => 
                              [debug] => 0
                          )
                  
                  )


                    • 30328
                    • 35 Posts
                    Actually... a useful feature for me would be for an option in the snippet call to forward to a particular ID after a page is created/edited. (This would bypass any problems with new friendly URLS I think)

                    Tommy T.
                      • 27889
                      • 415 Posts
                      @tommyt, now the editor is on the page you click add or edit, at the end a link is displayed for the new created or edited page.

                      @ola bizarre, id and parent are the same.

                      No more need to have a FDM call in model and update all , snippet and chunks with the new ones.

                      I will check your problems in few day or before.
                      Edit: I will add more check to easily debug all that.
                        MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
                        MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]