Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2017-09-11 01:58:42

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,392
Website

Re: com_connect - form and contact mailer

Thanks all…I’ve just gone with an inline class label.comRequired for now. Seems a bit strange that the class attribute for the input tag is also applied to the label tag, or maybe its just me :)

Offline

#12 2017-09-11 10:04:46

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: com_connect - form and contact mailer

jstubbs wrote #306942:

Seems a bit strange that the class attribute for the input tag is also applied to the label tag

Well it’d require extra attributes (like labelclass or something) which adds complexity. And as phiw13 says, you can easily target them individually if required by using a compound selector, so we decided this was an acceptable tradeoff.

If anyone can come up with an alternative method for class naming that is better/simpler/more flexible, by all means suggest it.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#13 2017-09-11 10:23:24

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,092
Website

Re: com_connect - form and contact mailer

There’s no reason why you can’t use:

<div class="myclass1">
    <txp:com_connect_text class="" name="name" size="32" label="Name" />
</div>
<div class="myclass2">
    <txp:com_connect_email class="" name="email" size="32" />
</div>

And then use CSS like this:

.myclass1 label { *declarations here* }
.myclass1 input { *declarations here* }

So I feel the current plugin behaviour is OK.

Offline

#14 2017-09-11 11:31:12

etc
Developer
Registered: 2010-11-11
Posts: 2,949
Website

Re: com_connect - form and contact mailer

philwareham wrote #306945:

There’s no reason why you can’t use:

<div class="myclass1">...

And then use CSS like this:

.myclass1 label { *declarations here* }...

Bloody css/js frameworks, gentlemen, with their proprietary classnames.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#15 2017-09-11 11:32:56

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,092
Website

Re: com_connect - form and contact mailer

etc wrote #306946:

Bloody css/js frameworks, gentlemen, with their proprietary classnames.

Oh. Yes I can see why you’d want to have more directly applied classnames now.

Offline

#16 2017-09-11 12:12:49

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,392
Website

Re: com_connect - form and contact mailer

philwareham wrote #306947:

Oh. Yes I can see why you’d want to have more directly applied classnames now.

Yes…this is for an updated website using Tachyons which is really nice to use but requires classes to be placed on individual elements which can be a pain…but I do think it is unintuitive to have a class applied to the Textpattern tag which relates to an input element also apply to a label element. I’m not sure what to suggest – it is an easy workaround I know.

Offline

#17 2017-11-04 13:57:50

Gallex
Member
Registered: 2006-10-08
Posts: 1,071

Re: com_connect - form and contact mailer

placeholder text doesn’t show up. :( what i should check?

my form:

<txp:com_connect to="john@example.com" label="" subject="Message" thanks="Your message has been sent, thank You!" lang="en-gb">
  <txp:com_connect_text label=" " placeholder="Name" break="" />
  <txp:com_connect_email name="email" type="email" label=" " placeholder="Email" break="" />
  <txp:com_connect_textarea rows="4" cols="25" label=" " placeholder="Message" break="" />
  <txp:com_connect_submit label="Send" />
</txp:com_connect>

Edit: Replaced email, textilised code. Uli

Last edited by uli (2017-11-04 16:31:54)

Offline

#18 2017-11-04 22:21:32

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,546
Website

Re: com_connect - form and contact mailer

Gallex wrote #307645:

placeholder text doesn’t show up. :( what i should check?

What is the Doctype of your site (Amin > Preferences > Site)? That attribute is only applied if it is set to HTML5.

Offline

#19 2017-11-05 07:44:56

Gallex
Member
Registered: 2006-10-08
Posts: 1,071

Re: com_connect - form and contact mailer

phiw13 wrote #307646:

What is the Doctype of your site (Amin > Preferences > Site)? That attribute is only applied if it is set to HTML5.

XHTML. changed to HTML5 and ‘problem’ solved. thank you!

Offline

#20 2017-11-06 09:57:58

Gallex
Member
Registered: 2006-10-08
Posts: 1,071

Re: com_connect - form and contact mailer

trying to send pdf file (34 KB).

my form:

 <txp:com_connect to="mar...@gmail.com" label="" subject="Messsage" thanks="Thank You!" lang="en-gb">
<txp:com_connect_text label="Name:" break="" />
<txp:com_connect_email name="email" type="email" label="Email:" break="" />
<txp:com_connect_file label="Send file" max="8000000" />
<txp:com_connect_submit label="Send" />
</txp:com_connect>

but still getting error message:

Send file must not exceed 8000000.

Offline

Board footer

Powered by FluxBB