Advancedform_XH

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Sun Sep 25, 2011 10:52 pm

Hello Jürgen,

please have a look at http://www.cmsimpleforum.com/viewtopic. ... 0&start=15.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Ulrich

Re: Advancedform_XH

Post by Ulrich » Tue Sep 27, 2011 1:15 pm

I installed the latest version (1beta7) in may contacts-page.

So far I like the idea of the template file, which can / must be edited by the webmaster.

But here is my problem, when

Code: Select all

div id="advfrm-Kontakt"
is written on the beginning of the source code, the form will be displayed at the very bottom of the screen, when putting die div-container at the very end, the form is displayed correctly.

Also, I found no way of figuring out where the captcha will be displayed, there is no "place-holder" for the captcha-code. In order to write something like "Bitte geben sie die dargestellten Ziffern ein" you have to questimate where the captcha is displayed, or is the captcha code always at the end - then it might be difficult to put some text before the captcha.

Ulrich

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Tue Sep 27, 2011 2:19 pm

Hello Ulrich,

thanks for your feedback. :)
Ulrich wrote:is written on the beginning of the source code, the form will be displayed at the very bottom of the screen, when putting die div-container at the very end, the form is displayed correctly.
That sounds rather very strange, and should have something to do with not properly nested html elements or perhaps with the stylesheet. If you use the template system it is not necessary to have a container with this id at all.

I've just had a look at your template. It seems that you should leave <div id="advfrm-Kontakt"> on top, and change the bottom to:

Code: Select all

  <div class="break">
    <div class="label"><label for="advfrm-Kontakt-text">Kommentar <span style="color:red">*</span></label></div>
    <div class="field"><?field text?></div>
<br>
Bitte geben sie zusätzlich die angezeigten Ziffern ein<br><br><br>
   </div>
</div>
This could work as expected.

Regarding the captcha: Indeed this is displayed at the end of the form. I'm not quite sure how to handle this, because other captcha plugins won't need additional text (at least it's integrated with Recaptcha_XH). But perhaps you're right, and I should change the behaviour. I have to think about this, because currently the CAPTCHA is not tied to the template at all.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Ulrich

Re: Advancedform_XH

Post by Ulrich » Tue Sep 27, 2011 3:01 pm

Hi Christoph,

your code mod has just some effect on the display of the text after / below the captcha, but the form is now again all the way down the page.

If I out-comment the first

Code: Select all

<div id="advfrm-Kontakt">
and the last

Code: Select all

</div>
everything is ok.

The form is displayed on top of the page and even the captcha is displayed properly.

The <div id="advfrm-Kontakt"> is generated inside the template form, without me doing someting special, exept pushing the button "generate template".

Ulrich

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Tue Sep 27, 2011 3:48 pm

Hi Ulrich,
Ulrich wrote:The <div id="advfrm-Kontakt"> is generated inside the template form, without me doing someting special, exept pushing the button "generate template".
That's right. It's done so in accordance to the standard-display, and to have another container for css styling.
Ulrich wrote:but the form is now again all the way down the page.
It must have something to do with the content of <div id="advfrm-Kontakt"> being to wide for the available place. So it probably breaks down below the navigation menu. You can test that by removing the comments from the div, and specifying in plugins/advancedform/data/Kontakt.css something like

Code: Select all

#advfrm-Kontakt {width:400px; overflow: auto}
I'm quite sure that the contact form will be displayed at the right position than, displaying a horizontal scrollbar just above the captcha.

But OTOH: I've you're satisfied with the display as it's now, you might leave everything as it is.

I will rethink the layout of the form with regard to the <div> and the CAPTCHA.

Christoph

PS: Forget about the explanations above – they're wrong! The problem is class .break. I'll probably have to learn something more about CSS, before I can come up with an improved layout. ;)
Christoph M. Becker – Plugins for CMSimple_XH

Ulrich

Re: Advancedform_XH

Post by Ulrich » Tue Sep 27, 2011 4:11 pm

This works somehow, don't ask me way..

Even if I set width to 100%

Code: Select all

#advfrm-Kontakt {width:100%; overflow: auto}
it works.
o.k. if I increase the width of the textarea, I will at sometime get an scrollbar, but that is o.k.

So maybe it is useful to include the width of the textarea in the css file - or in the config section?

Or can I limit the width of the textarea?

Ulrich

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Tue Sep 27, 2011 5:05 pm

Hi Ulrich,
Ulrich wrote:This works somehow, don't ask me way..
I'm quite surprised. I was sure that it'll work, but as I've tested it, it didn't. :?
Ulrich wrote:So maybe it is useful to include the width of the textarea in the css file - or in the config section?
The width of the textarea is already included in the (x)html output, as attribute cols, which can be configured in the form editor (it defaults to 40). This attribute is required by HTML 4.01 and XHTML 1.0, so I've included it to produce valid output. But the attribute can be overriden by CSS, which is in your case done by the templates stylesheet (width:98%). That shouldn't be a problem, but somehow it is. But you can still override it in Kontact.css, the empty entry is already there, just put the style info into it:

Code: Select all

#advfrm-Kontakt-text {width: 500px}
Basically a percentage should work too, but I'm not quite sure anymore.

BTW: you should have a look at the font-size in the 3 other input fields – 9px seem quite small.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Ulrich

Re: Advancedform_XH

Post by Ulrich » Tue Sep 27, 2011 6:48 pm

Tx Christoph, it works :D , also the font-size is bigger now.

But is

Code: Select all

<? ......... ?>
short hand for

Code: Select all

<?php ......... ?>
If yes, some hosts don't like this short form, I remember some posts were a certain template didn't work due to the short hand form of <?php.
(short_open_tag) has to be set to true.
Ulrich

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Tue Sep 27, 2011 7:03 pm

Hi Ulrich,

IMO the short tags should better be avoided, because they won't work if short_open_tag is off, and it might clash with xhtml.

But I guess you're refering to

Code: Select all

<?field FIELD_NAME?>
This is not a form that will be seen by PHP. I do preprocess this before evaluation to:

Code: Select all

<?php echo advfrm_display_field('FORM_NAME', 'FIELD_NAME')?>
It's just a small convenience for the template authors, and it will work despite short_open_tags off. But it's syntax is very restricted, see http://3-magi.net/plugins/advancedform/ ... -templates

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Wed Sep 28, 2011 10:27 pm

Hello community,

I've just released Advancedform_XH 1beta8. It's available from my website.

Advancedform_XH facilitates creating your own mail forms for integration to CMSimple_XH. Advancedform_XH is based on AdvancedForm by Jan Kanters. Due to the increased quality standards of CMSimple_XH and to prevent possible problems with other plugins in the future, a complete rewrite was necessary. Though the functionality basically remains the same, it is to assume, that at least minor bugs were thus introduced.

The current version has to be considered Beta software! Use with caution!

Thanks to all who tested Pagemanager_XH so far, for their valuable feedback, which helped me to improve Pagemanager_XH to the current state.

Particularly I want to thank Ulrich, who made me reconsider the CAPTCHA integration. I decided to keep it out of the template, to avoid problems with other CAPTCHA plugins. But I've added an configurable explanatory text to the built in CAPTCHA.

Any feedback is welcome.

Christoph

PS: Cryptographp_XH 1beta1 doesn't work with Advanceform_XH 1beta8! This will be changed in the next version of Crypthgraphp_XH, which will be released ASAP.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply