|
Cookbook /
FoxEdit-TalkBack to FoxEdit Leave latest comments/questions at the top please!Hi,
I do not understand what you are trying to do. You don't want a link which opens content in an edit form? Also, I am looking for a way to use FoxEdit with a checkbox array. I cannot seem to get the Form to SELECT the checkboxes that are actually selected. The values get saved to the PTV as an array, but the form does not select them.
Thanks!
I can't advise you on this without seeing a form example. Can you email this to me? Or post it here, but pleae abbreviated with just the relevant part. HansB October 07, 2011, at 02:16 AM Hi, I've got the automatic Edit links installed as described. The problem is that when I save an edited section, the anchor is not saved with the text, so the edit link disappears. It's like a one-time usage. In the EditSectionForm, the anchor doesn't show up in the textarea... What can I do? Thanks! Try with latest version foxedit.php. Note also the different default location of edit forms. I also tightened the foxedit anchor markup (which creates automatic dynamic foxedit links) to include a minus sign in front of digits, like Hi Hans, I have a problem. When i make a link {[foxedit #ab ]} (i use the example form) for editing section, the edit section do not stop at No warning or flagging of simultaneous editsFoxedit, unlike standard PmWiki editing, does not warn the user about conflicting concurrent edits. For example if I open a section to edit, and get called away, then return to complete the edit, everything that anyone else has entered in that section in the interim will be lost with no warning or flagging of the conflicts. Is there a way to make Foxedit handle simultaneous edits the same way PmWiki does? If not, is there a way I can make it at least warn the user that something was overwritten? - RandyB December 4, 2009 at 11:49 AM. ?action=foxedit§ion=... not showing up when PreviewingHi - While updating a PTV or section using FoxEdit (at Preview is handled by fox.php (in function FoxHandlePost) and uses the foxaction 'display'. The FoxEdit form has the Preview button and some Preview section (or should have if you want a Preview). I cannot see that you can change the url. But perhaps you can change the Preview section on the edit form, and/or use a #Section creation with FoxEdit Hi. While using FoxEdit, if a The creation of a not-yet-existing PTV is done by Fox, not FoxEdit. The hidden PTV is the default format. You can specify other formats in the Fox form (in your case the edit form called by FoxEdit) by adding a 'ptvfmt' parameter to thew fox markup: ptvfmt=section will tell Fox to create a new PTV as an anchor section. - HansB PS - in addition, when trying to click a fox-edit link to a section that does not yet exist, one gets the following foxmessage: Error: cannot find section ''
Thanks for spotting this bug. Fixed now. - HansB May 11, 2009, at 03:29 AM so, first:
(:foxptv ptvtarget={$EditTarget} ptvfields={$EditSection} ptvfmt=section :)
however, I noticed one error on the FoxEdit page. in the working examples towards mid-page, the EditSectionForm example: (:fox editform foxaction=replace put=overwrite target={$EditTarget}{$EditSection}
redirect={$EditTarget}{$EditSection}:)
should instead be: (:fox editform foxaction=replace put=overwrite target={$EditTarget}#{$EditSection}
redirect={$EditTarget}#{$EditSection}:)
then, in FoxEdit, I've found that commenting out the following line causes everything to work as expected, and the new section is added: is there a different check that should be made here, instead of commenting it out?
Hans replied: I think you are right that the EditSectionForm is missing
But you should not use it anyway as you want to create a new anchor
FoxEdit uses two different ways to call the two different default
If you use markup like I hope that makes it clearer! ~Hans ok, i get it.
so, it now works without editing the FoxEdit code. here's what i did:
(:fox editform ptvtarget={$EditTarget} ptvfields={$EditSection} ptvfmt=section redirect=1:)
2.
{[foxedit myTestSection label="edit testSection2" form=FoxTemplates.EditSectionAsPTVForm]}
that all seems to do the trick. thank you so much for explaining... now i wonder one last thing. once i've created a section this way and go back to edit it again, as a section, is there any benefit to using the EditSectionForm? it seems using the EditSectionAsPTVForm does this just fine. i guess i'm not sure what difference there really is between these two forms, other than that they probably access two different components of Fox code to do the same thing, right? thanks again for the help,
Hans' reply to the PmWiki list, 15 May 2009 4:44:50 AM PDT: Yes, they will do the same thing.
i was thinking of PTV's as simply *a thing* on the page, whereas
PmWiki defines various markup as page text variables, and allows
[[#sectionname]] .... .... [[#sectionnameend]] as a PTV type. Such are not seen as a PTV by default in PmWiki.
But if someone adds a new type of PTV (a new PTV pattern definition in
~Hans Working Examples of FoxEdit Q: Hans, could you maybe include a working example for this recipe? A functional example, which I could just copy and paste onto my site, that would be really helpful for me. I don't know if it's that I'm missing something, or if there is some information missing from the recipe page, but I just cannot make this work. Did you look at FoxContacts? There is a link to a live example on my site. All form pages are in the same group, click the "List Group" button in the footer. And the "source" button can show you the code I used. FoxForum also uses foxedit links. For a very simple example you can take a look here: Thanks very much, Hans - the WikiSandbox2 example on your site cleared up my confusion. I noticed that even though I have $EnablePostDirectives set to "false" in Fox.php, one can still post directives when editing a section. Is there currently any setting I can change to prevent that? - Phil Thanks! I updated fox.phpΔ so the FoxPTVUpdate function will now also prevent directive posting if $EnablePostDirectives = false. HansB January 12, 2008, at 04:14 AM Excuse me, but where can I see simple code/source for a working examples of FoxEdit and FoxDelete? Especially I'd like to see it in templates/forms for Fox... Is it possible somewhere? at present it is implemeted in FoxForum and FoxContacts, both perhaps rather complex examples, as both use display templates as well as form templates. Here is a basic foxedit example, in wiki source code, to edit a page text variable. The link will call the default Fox form to edit PTVs, which is FoxTemplates.EditPTVForm (source code on FoxEdit page): VarA: some value
{[foxedit VarA 'edit VarA']}
The next example will open a page section in the default edit form FoxTemplates.EditSectionForm (source code on FoxEdit:
{[foxedit #section1 ]}
[[#section1]]
text in section1
more text...
[[#section1end]]
The next example will open three PTVs to be edited with a custom Fox form added to Site.FoxTemplates section #customform:
{[foxedit form=Site.FoxTemplates#customform]}\\
(:ptvA: abcdefg:) {$:ptvA}\\
(:ptvB: defghi:) {$:ptvB}\\
(:ptvC: 123456:) {$:ptvC}\\
and the custom form template:
[[#customform]]
(:fox frm ptvtarget={$EditTarget} redirect=1:)
(:input defaults source={$EditSource} :)
'''Editing {$EditTarget}:'''
||
|| ptvA||(:input text name=$:ptvA :) ||
|| ptvB||(:input text name=$:ptvB :) ||
|| ptvC||(:input text name=$:ptvC :) ||
|| ||(:input submit post Save:) ||
(:foxend frm:)
[[#customformend]]
Note that FoxEdit defines page variables Perhaps all this should be on the FoxEdit page. For FoxDelete links I will try to add some examples there. HansB April 03, 2008, at 12:51 PM Thank you for explanations! |