Jump to content

Search the Community

Showing results for tags 'textarea'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 18 results

  1. Hey All. I am creating a new field of type 'FieldtypeTextareaLanguage' via a module. Everything is working just fine expect that I can not find any information on how to set the 'Text Formatter' (to HTML Entity Encoder) and 'Inputfield Type' (to CKEditor). I tried the following which failed and was just a guess because of the IDs and select-values in the HTML... $f = new Field(); $f->type = $this->modules->get("FieldtypeTextareaLanguage"); $f->name = $newstcontentfieldname; $f->label = $newstcontentfieldlabel; $f->set('tags','servicetype'); $f->set('icon','fa-pencil-square'); $f->set('asmSelect0','TextformatterEntities'); $f->set('Inputfield_inputfieldClass', 'InputfieldCKEditor'); $f->save(); [EDIT] Furthermore, I just came across the question how to set the 'Visibility' --> ' Show this field only if' Option? Is there any documentation that I missed sofar about these field-variables and how to set them? [/EDIT] I am thankfull for any suggestion and hope somebody can help me. Thanks a lot!
  2. So, I am not even sure if this is possible, but I thought I would ask anyway. I was building a "system" that would make some modals (izimodal) using a few fields. A user would select the color combo they want, enter a title, fill out the body, and then I was going to pass this (in the template) to fill in the modal. I have this all working pretty flawlessly. <div id="example-modal" class="model" data-izimodal-autoopen data-izimodal-transitionin="fadeInDown" data-izimodal-iframeURL="<?php echo $page->example->url; ?>"></div> <script type="text/javascript"> $("#ca-entrance-modal").iziModal({ title: 'Custom Title Here', subtitle: '', headerColor: 'Custom Color Here', history: false, iframe : true, fullscreen: false, loop: false, width: 350, iframeHeight: 350, top: null, bottom: null, borderBottom: false, closeButton: true, }); </script> However, I have hit a road block. The modals are using iframes to pull in the corresponding modal page, but the javascript options are not being iframed (so the modal will actually launch etc). My thought was the user can just copy the page link to the modal, and insert it into the iframe and simply adding the js code, the modal would work (which it does). I guess here is my actually problem. Since the user is selecting several options to "customize" the modal, the javascript is custom and differs between each modal. Is there a way to "disable" a textarea, and output the "custom" javascript inside the textarea so they can copy it for inclusion on their actual pages? Or, is this something that I should just output in the frontend view for users.
  3. I am using sanitizer->textarea to sanitize and format the message inputted. I've tried various options including newlineReplacement but have been unable to convert newlines to <br> tags. Although the PHP nl2br function works as expected. Any suggestions? Thanks.
  4. I'm sure the answer is fairly simple but I was wondering if there's an easy way to define the number of lines for a textfield in a template. I know you can set size limits for images fairly easily using $image->size(100, 100); but wondered if there was the equivalent for text?
  5. I'm trying to write a value to a textarea via de API. I'm making use of the Multivalue Textformatter module which works great for when the field has multiple rows added via admin. But now I'm trying to add multiple lines to the textarea via the API and I cannot for the life of me figure, or find out how to do this. I'm adding "&#13;&#10;" to the end of of each new line. When I apply this value to a textarea in the template, this works fine, but when I $line = "this is a line"; $p->textarea = $line."&#13;&#10;" I just get "this is a line &#13;&#10;". This is the case with the "/n" and "<br>" as well. Turning on tinyMC doesn't help either as the output in the template is still the same. Turning on the HTML Encoder doesn't help either.
  6. Hello all. I am working on a Cooking Recipes profile and have a field recipe_nutrition where I add the nutritional values in a textarea field like: Calories: 2000kj Fat: 10gr Carbohydrate: 10gr Protein: 50gr Vitamin C: 10mg Iron: 20mg So I am using the explode function to separate the lines and it works fine (if I am just styling the values as text list), but now I would like to take the text content before and after the colon and add them in a table. Also I need to find first the line that contains Calories and print the value in frontend. As far as the lines are not added in a specific order, the Calories: 2000kj could be first, second, third line etc. In the perfect scenario the line should be checked for a specifict text (in my case Calories) and if it contains it to get the text after the : sign. Maybe there is a better approach to using API and modules to achieve a simple Nutrition table with all the values without creating a field for every value but grabbing it from a text content or else? Check the image for better understanding of the goal.
  7. i use a textarea-field with CKEditor. its filled with text which has a link. this field is in two of my templates. the first template is an article and everything is finde. the second is an index-template and textarea is placed inside a link. this causes problems. index-template looks like this <a href=""> … <?php echo $page->textarea; ?> … </a> which results in: <a href=""> <p>Lorem Ipsum <a href"">Test</a></p> </a> is there a way to output this textarea wihtout the <a> links? i don't need the link on my index-template
  8. Hi Guys, Here are two issues that took my quite the amount of effort to fix so here im sharing the answers with you. 1. Non-admin user can’t edit profile information using Fredi. I installed Fredi and I sort of got it to work since when logged into Admin i'm able to edit my profile information, when logged in as anyone else however I don't get the "Edit" button. Also showing just certain specified fields doesn't work. When i call Fredi using this syntax and I'm loggedin as Admin it shows me all the editable fields of the user profile, not just "zzp_profiel_naam". $username = $user->name; $another_page = $pages->find("parent=user, name={$username}")->first; echo $fredi->render("zzp_profiel_naam", $another_page); Also I was wondering if it is possible to embed the edit-fields Fredi shows me in a lightbox directly on a page without the lightbox. This would make handeling the updates a lot easier also since it won't have to open the lightbox again on submitting changes, and you won't have to close it again after doing so. SOLVED Instead in using FREDI I used to backend modal to do this, include it like this: <?php $page->setOutputFormatting(true); ?> <iframe src="/cms/profile/?modal=1" style="width:calc(100% - 300px); float:left; border: 2px solid #ccc; padding:0px 0px 0px 0px;" onload="resizeIframe(this)"> </iframe> I used this javascript to change the iframe height to the height of the dynamic content, you could maybe add a onchange listener to resize it every time the height of the content changes. <script language="javascript" type="text/javascript"> function resizeIframe(obj) { obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px'; } </script> A problem arose when trying to update single image fields, the modal added a second and left the first as it was. To remove the first when uploading a new one to a single image field add this to /site/ready.php // Make sure image upload into single image field deletes old image first $p = $page->process; $t = $page->template->name; if ("ProcessProfile" == $p && "admin" == $t) { $page->addHookBefore('InputfieldImage::fileAdded', function($event) { $u = wire('user'); $i = $u->place_your_image_field_name_here; while ($i->count() > 1) { $i->shift(); } }); } SOLVED Click here for the answer: https://processwire.com/talk/topic/10884-text-area-paragraphs-when-creating-a-page-from-a-form-submission/ 2. Line Breaks from Form Builder textarea not being transferred to the Rich Text Editor on the page it is saved to. What I need is for each textarea inside any form on the site to maintain it's line breaks like submitted by the user when transferred from entries to a page after being checked. The result in the form entries is what is is supposed to be, maintaining the line breaks. When transferred to a page however the breaks don't get transferred end I end up with one large block of non-breaking text. This is what me and some others have concocted to far. The upper part is working and sets a test message in the logs. The bottom one however is not. If I change the method to "saveForm" instead of "savePage" it does give me an error since afterwords I try to call objects that don't exist within the "saveForm" method, so I would assume it's getting called. // This is getting called and sets a test message in the Logs $forms->addHookAfter('FormBuilderProcessor::saveForm', function($event) { $processor = $event->object; $event->log->save('test', 'data=' . print_r($data, true)); $event->log->save('test', 'savePageFields=' . print_r($processor->savePageFields, true)); }); // This is not setting a log file, not even when I transfer the Form entry to a page $forms->addHookBefore('FormBuilderProcessor::savePage', function($event) { $processor = $event->object; $data = $event->arguments(0); foreach($processor->savePageFields as $fieldID => $name) { if(empty($data[$name])) continue; $field = $event->fields->get($fieldID); if(!$field || !$field instanceof FieldtypeTextarea) continue; $data[$name] = "<p>". str_replace("\n\n", "</p><p>", $data[$name]) . "</p>"; $data[$name] = str_replace("\n", "<br />", $data[$name]); $event->log->save('test', 'data=' . print_r($data, true)); $event->log->save('test', 'savePageFields=' . print_r($processor->savePageFields, true)); } $event->arguments(0, $data); }); If you can, please please please! Help me out, im really desperate and have been trying to fix these two problems for ages now Thanks in advance, Bram
  9. Hi, i'm asking myself, if it's possible to have an editor, who's usable for people without markdown knowlege, but saves the WYSIWYG stuff in markdown format. For instance one marks the text "Lorem Ipsum", chooses H2 in a dropdown and the text is displayed for him as H2, but the sourcecode in the background is ##Lorem Ipsum , which gets saved and outputed per markdown module. i fiddled a around with the markdown input formating and CKEditor as Input, until i learned that markdown will only format the output someone already tryed to do so?
  10. Hi processwire people, fresh install, created a Textarea custom field; inputfield type: CKEditor content type: markup/html When I edit my page if I select some text and make it bold or italic, text formatting is not saved. Never happened before...
  11. Hello, I have a template with two textarea fields. The strange thing is, that in the first textarea I have to set explicitely br tags to get line breaks. But the same thing in the second textarea just displays the br tag instead of executing a line break. What's wrong here?
  12. Hey, guys!!! I'm having a very big problem with Tinymce in processwire. I feel so stupid about it, but can't find the solution. Hope someone can help me. When I change to html and paste html tags inside a <code> tag, they get converted and disapear. How can I avoid this? All Iwanted was to show some code examples. I feel so noob right now '-' Thank you =)
  13. Hello everybody! I've actually created already a web that works perfectly with processwire. There only some dumb questions which I do not figure out by myself. This is one of them... I have a field called "contact" where obviously the client will insert her contact details. The client wants that if she inserts and email it will be a hyperlink. She doesn't need a form or anything too fancy. She would be ok with a mailto applied to it. The field is in this moment applied as a textarea. The details she has "Newlines to XHTML Line Breaks" applied. Is there a special way so I can apple a simple html link with a hyperlink with mailto bla bla bla. I would like the most simple workout as possible. Really thanks!!! Once this is finished and some other details I will show to the team!
  14. Hello, I found 1 small bug. If I change body field to email type and change back to textarea, toolbar disapear. Where can be problem ?
  15. Hope this is the right place for this. Following scenario: PW is running on my localhost: http://localhost/mysite when I insert an image into the textarea the path is like this: "/mysite/site/assets/files/1028/berlin.jpg" Then I changed to a development host name, which point to the same directory: http://mysite.dev Then all the inserted images do no work anymore, because obviously "/mysite/site/assets/" does not exists, it then should be "/site/assets/" Since the image path is written in this plain form into the db, this kind of inflexible. Any solution to this? Edit: It sure could be done easily with a .htacces rewrite: RewriteRule ^mysite/(.*) $1 but I'd consider this hacky then.
  16. My site has several pages that require access to one-off scripts the rest of the site doesn't use. To keep pages loading as fast as possible we don't load these scripts on every page. Instead, we typically include them on a per-page basis in an extra block loaded after the footer html. When I first started trying to port to PW I added textarea fields for "extra_head" and "extra_footer" into my primary template, and I hoped I could include these script loading directives in the "extra_footer" block and be off to the races. In fact, this would have worked beautifully if I had hard-coded paths for these scripts. There's the rub, however! I was trying to do things the PW way, so I used the php directives to get the path to my site's "templates" folder. When I output this "extra_footer" field in the page, the php doesn't get executed, so I never get the script path, and the whole thing fails. <script src="<?php echo $config->urls->templates?>static/js/jquery.isotope.js"></script> I don't know if I have output the field in my template the wrong way, so maybe there's some other php or api call that will cause it to actually interpret the code in this field during output? Here's what I have used: <?php echo $page->extra_footer; ?> I had this problem in other places, too. For example, during the port of the site we decided to start out with a "body" textarea that we bulk-dropped the html markup from the previous site into. This html had references to images and other static resources that we tried to access with the same type of php path reference as in the example above. Of course, none of it worked because that php code never gets executed. Is there a way to have the php in fields get executed during the page production? If not, is there some other reasonable way to get the path to site resources like scripts and general-purpose images (that wouldn't usually be included in a page's "images" field? Thanks, Rick
  17. The thing is that no matter what my settings are, tinyMCE just won't show, always the plain textarea i tried it both for textarea and textarealanguage I've got the InputField Type set(in Details tab) set to tinyMce TextFormatters (same tab) are empty I didn't really mess with any core files, but maybe there's something missing? Or maybe I should install somethiing additionally to standard processwire installation? any clues would be helpfull
  18. I found this problem which I dont know how to solve. I created a field which is a textarea. The client will place her information inside and that will be echoed into the web. Simple and clear. The only thing is that the client has long text so he will create paragraphs. In the box of the textarea in the CMS PW you can create text and with the keyboard ENTER you can make paragraphs. Once saved it still remains with paragraph format as the spaces are respected in processwire. But... In the web you only see one block of text. What method has to be done so the client can create spaces between the text? Thanks Dani
×
×
  • Create New...