Textpattern CMS support forum

You are not logged in. Register | Login | Help

#141 2018-10-19 08:41:02

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

Re: com_connect - form and contact mailer

how to change input placeholder text color? :)
this way, it’s not working:

.comConnectForm input.comText{
font-size:17px;
color:#bbb !important;
}

any ideas?

Offline

#142 2018-10-19 08:48:12

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

Re: com_connect - form and contact mailer

Gallex wrote #314641:

how to change input placeholder text color? :)

the ::placeholder pseudo element ?

input::-ms-input-placeholder {
  color: red;
}

/* supported by Safari 9.2+ Firefox 51, Chrome 57 */
::placeholder {
  color: pink;
  opacity: 1; /* Firefox; */
}

Last edited by phiw13 (2018-10-19 08:48:48)

Offline

#143 2018-10-19 10:38:27

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

Re: com_connect - form and contact mailer

phiw13 wrote #314642:

the ::placeholder pseudo element ?

thank’s again specalist!

Offline

#144 2018-11-17 09:50:29

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,910
Website

Re: com_connect - form and contact mailer

There seems to be a problem with the validation of the com_connect_file tag. This is how I am using it:

<txp:com_connect_file label="Send file" max="8000000" accept=".pdf,.docx,.doc" required="1" />

The validation error reads:

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


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#145 2018-12-12 17:01:57

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

Re: com_connect - form and contact mailer

dragondz has flagged up that some people don’t use the label attribute but use placeholders instead to indicate what users are expected to supply.

It’s of course possible to use label="" to suppress them, but that also means the default email that’s sent out doesn’t have the label(s) in front of the fields content. Even specifying the name attribute doesn’t fix this.

You can get around that by making your own body_form for the email body and hard-coding your own labels in.

Question is: are these workarounds okay or can/should we do something better in the default email template? A few options I’ve come up with, none of which are particularly appealing:

  1. Leave it alone – the body_form attribute suffices for such cases.
  2. Introduce some flag attribute to control this behaviour, like display_label and set it true by default. Bonus points for being able to override it on the containing <txp:com_connect> tag for all contained tags.
  3. Automatically fall back on the name field (although that might backfire with things like checkboxes/radios because their name is auto-generated in some cases, I think).
  4. Introduce a new attribute that can be used as the field label that appears in the email. Defaults to label unless this overrides it.
  5. Set some user-definable priority system up on the container tag that allows you to define what happens, e.g. placeholder:label:name:"Field" would search the given fields in the given order and use the last entry as a fallback label in the email if all the previous ones were empty. Would only apply to the built-in message body, which is not ideal from a usability stance.
  6. Something else…

Anyone have any views on this? Is it a problem we should tackle? If so, how?


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

#146 2018-12-12 19:06:06

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,910
Website

Re: com_connect - form and contact mailer

What if the plugin detects if there are labels and if not, the placeholder names are sent?

Too much maybe?


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#147 2018-12-13 07:42:53

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,294
Website

Re: com_connect - form and contact mailer

Hi, for me the solution 2 should be ok if it s simple to code.

Offline

Board footer

Powered by FluxBB