Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How To Get Plaintext Multiline Field?

@johnywhy

Participant

hmm, ok, taking a different approach. i’m inspecting donmik’s files in ‘buddypress-xprofile-custom-fields-type’. Hope that’s ok, donmik!

i found ‘datepicker’ in:

bp-xprofile-custom-fields-type.php
classes\Bxcft_Field_Type_Datepicker.php
lang\buddypress-xprofile-custom-fields-type.pot
lang\en_US.mo
lang\en_US.po

(ignoring the non-english files for the moment).

i simply duplicated all the ‘datepicker’ code-chunks in these files, and replaced ‘datepicker’ with ‘textarea’.

also duplicated the file ‘classes\Bxcft_Field_Type_Datepicker.php’, renamed it ‘Bxcft_Field_Type_Textarea.php’, and removed any date-specific code i found there.

and so on and so forth.

then i zipped it, uploaded to wordpress, activate, and added my new Textarea field to a form.

i actually got no errors, and actually got a text field on my registration form!

unfortunately, it’s only a one-line textbox, not a multiline textarea.

hrm. In inspector, the displayed field is:

<input type="string">

so something in donmik’s code, or BP, or WP, is causing this to render as an <input> rather than <textarea>

….

Skip to toolbar