Custom Field

This topic contains 1 reply, has 2 voices, and was last updated by  ClassiBase 1 year, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #2610 Reply

    Does we have a hack how to add in Manage>>Custom Fields and the type is textarea (plain text or HTML)?

    I think it can be done but might add additional rows in database?



    #2613 Reply


    Actually all custom fields stored as text field with 65535 chars(using single-byte characters).

    So if you enter long text in regular text input then it will be stored. As a quick solution if you know shich text input you want to appear as multiline textarea then you can convert it using jquery on input form.

    Something like this can do it (for example if custom field id is 28) you can know your id and where to put this javascript from here

    	// use custom field id here id used is 28
    function convert_input2textarea(name){
    	var $input = $('input[name="cf[28]"]');
    	var $textarea = $('<textarea></textarea>');

    This will just convert single line input to textarea when posting or editing ad. It is not suitible for PHP/HTML field it will not execute and it is not suggested to give users such power to enter php or javascript to alter your site. it will not be secure.


Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Custom Field
Your information: