Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#271 2021-02-02 13:57:37

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,443
Website GitHub

Re: com_connect - form and contact mailer

Destry wrote #328491:

What about <t::yield>, <t::body>, etc. ;)

Possibly, if you want to save one character’s typing :)

I recall the reason we chose double colon in the first place is so there’s less likelihood of a clash with namespaced values like <smd:something>, which are valid in XML. For consistency, we could look into a double colon for txp native tags too. Not sure what impact that would have on the parser. Oleg would be able to comment.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#272 2021-02-02 14:18:27

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: com_connect - form and contact mailer

Destry wrote #328488:

I almost think the new double-colon tags should be the new core suite.

Ahem.. it’s there since txp 4.6 (2016) :-)

Bloke wrote #328493:

Not sure what impact that would have on the parser.

No extra impact, whatever new scheme (e.g. <body:: /> or even <body: />) we allow. The price of the double colon syntax will mainly remain the difference between strpos() and preg_match(), multiplied by ~1000 parser calls to process an average page — hardly noticeable.

Offline

#273 2021-02-02 16:23:40

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: com_connect - form and contact mailer

etc wrote #328494:

Ahem.. it’s there since txp 4.6 (2016) :-)

Heh. True. What I had in mind as I wrote that was changing the focus of tag docs. O_o

<body: />)

Ooh, like.

Offline

#274 2021-02-16 17:16:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,378
Website GitHub Mastodon Twitter

Re: com_connect - form and contact mailer

Apologies I am posting this here but I could not find a dedicated thread for ext_file_attach which returns a validation error

Attribute maxlength is only allowed when the input type is email, password, search, tel, text, or url.

I understand maxlength to be the max attribute of the plugin. Is there a way to have this valided or should I just omit the attribute?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#275 2021-02-16 17:36:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,443
Website GitHub

Re: com_connect - form and contact mailer

Ugh, why am I trying to set the maxlength on a file input tag? That’s mad. Try editing the plugin and taking out lines 261-267. That should fix it. viz. remove this:

    if ($min) {
        $attr['minlength'] = 'minlength="' . intval($min) . '"';
    }

    if ($max) {
        $attr['maxlength'] = 'maxlength="' . intval($max) . '"';
    }

Please let know if that works and I’ll do it in the plugin.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#276 2021-02-16 17:58:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,378
Website GitHub Mastodon Twitter

Re: com_connect - form and contact mailer

Bloke wrote #328916:

Ugh, why am I trying to set the maxlength on a file input tag? That’s mad. Try editing the plugin and taking out lines 261-267. That should fix it. viz. remove this:

if ($min) {...

Please let know if that works and I’ll do it in the plugin.

So should I just remove the max attribute after updating the code with the one you suggest and add the max upload within the code?

The reason I am asking is because just updating the code and leaving the max attribute there, I still get the same error.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#277 2021-02-16 18:12:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,443
Website GitHub

Re: com_connect - form and contact mailer

I was hoping the max attribute would be used only to specify the max file size, and then remove it from the attribute list so it doesn’t appear in the final HTML. Must be more involved than I thought, sorry. I’ll patch the plugin tonight.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#278 2021-02-16 22:05:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,443
Website GitHub

Re: com_connect - form and contact mailer

Okay colak, try v1.0.4 and see if it’s any better. A few little fixes and enhancements to do with the max file size.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#279 2021-02-17 05:45:03

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,378
Website GitHub Mastodon Twitter

Re: com_connect - form and contact mailer

Hi Stef, thanks so much for looking into this. 1.0.4 actually did fix the particular error but created another one others.


  • Attribute required not allowed on element input at this point.
  • Attribute required is only allowed when the input type is checkbox, date, datetime-local, email, file, month, number, password, radio, search, tel, text, time, url, or week.
  • The value of the for attribute of the label element must be the ID of a non-hidden form control.

Last edited by colak (2021-02-17 06:07:48)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#280 2021-02-17 11:05:21

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,443
Website GitHub

Re: com_connect - form and contact mailer

Ooops, sorry. Patched it in v1.0.5 with luck.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#281 2021-02-17 17:06:24

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,378
Website GitHub Mastodon Twitter

Re: com_connect - form and contact mailer

Bloke wrote #328926:

Ooops, sorry. Patched it in v1.0.5 with luck.

This works just fine, although I have yet to test it with files larger than the php.info limits. I’ll be doing that soon.

Many many thanks!


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#282 2021-02-18 05:29:54

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,378
Website GitHub Mastodon Twitter

Re: com_connect - form and contact mailer

I know this is a stupid question but I am trying to style the generated upload button but the applied styles on .comFile do not appear to make any visual difference.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#283 2021-02-18 06:04:26

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,637
Website

Re: com_connect - form and contact mailer

Are you trying to style the button that reads “Browse” in Firefox or “Choose File” in Safari ? That is a bit more difficult as it is in the shadow DOM

For Safari (and Edge <18 !) and Chromium based browsers you can use [type="file"]::-webkit-file-upload-button {}, with all the usual rules & possibilities (@-webkit-appearance: none needed for Chromium I think.)

For Firefox < 82 you are ought of luck, Firefox newer that 82 supports the following standardised pseudo-element: [type="file"]::file-selector-button {}

(Safari 14.1 will soon support that too, no clue about Chromium brwosers)

For older (IE 11…) I’ll have to dig in my archives.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#284 2021-02-18 08:49:24

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,378
Website GitHub Mastodon Twitter

Re: com_connect - form and contact mailer

Thanks so much Philippe, I’ll be experimenting with your suggestions this afternoon.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#285 2021-02-18 08:54:53

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,637
Website

Re: com_connect - form and contact mailer

colak wrote #328948:

Thanks so much Philippe, I’ll be experimenting with your suggestions this afternoon.

Have fun!

FWIW, a somewhat ugly test file including support for IE11
and not-fully-up-date example in my Sandspace admin theme


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

Board footer

Powered by FluxBB